Monitor tag propagation¶
Atlan's background tasks queue provides essential insights for monitoring
tag propagation of assets, detailing completed, pending, in-progress, and deleted tasks.
In Atlan's SDK you can use the FluentTasks
object to search the tasks queue.
Run the search¶
For example, to initiate a search for pending tag propagation tasks related to a specific asset after a tag has been added:
Search for background tag propagation tasks | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 |
|
- Start with a client to run the tasks search through. For the default client, you can always use
Atlan.getDefaultClient()
. - To search across all tasks, you can use the
tasks.select()
convenience method on a client. -
The
.where()
method allows you to limit to only tasks that have a particular value in a particular field:GUID
of the asset for which you want to retrieve tag propagation tasks.- Specify the task type; in this example, we're retrieving tasks for monitoring propagation after a tag has been added to the asset.
- Specify the task status; here, we're checking for any pending tag propagation tasks for the given asset.
Note: There's no need to try to remember or even know the precise string values for the above constants. Enums for these values are available in the SDK, making it easier for you.
-
The search will only run when you call the
stream()
method, which will then lazily-load each page of results into a stream. - This is the pattern for iterating through all results (across pages) covered in the Searching for assets portion of the SDK documentation.
Search for background tag propagation tasks | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
|
- You can use
FluentTasks()
to simplify the most common searches against the Atlan task queue. -
The
.where()
method allows you to limit to only tasks that have a particular value in a particular field:GUID
of the asset for which you want to retrieve tag propagation tasks.- Specify the task type; in this example, we're retrieving tasks for monitoring propagation after a tag has been added to the asset.
- Specify the task status; here, we're checking for any pending tag propagation tasks for the given asset.
Note: There's no need to try to remember or even know the precise string values for the above constants. Enums for these values are available in the SDK, making it easier for you.
-
Build the task request object using the provided search criteria.
- Initiate the task request search by providing the created request object.
- This is the pattern for iterating through all results (across pages) covered in the Searching for assets portion of the SDK documentation.
Search for background tag propagation tasks | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 |
|
- Start with a client to run the tasks search through. For the default client, you can always use
Atlan.getDefaultClient()
. - To search across all tasks, you can use the
tasks.select()
convenience method on a client. -
The
.where()
method allows you to limit to only tasks that have a particular value in a particular field:GUID
of the asset for which you want to retrieve tag propagation tasks.- Specify the task type; in this example, we're retrieving tasks for monitoring propagation after a tag has been added to the asset.
- Specify the task status; here, we're checking for any pending tag propagation tasks for the given asset.
Note: There's no need to try to remember or even know the precise string values for the above constants. Enums for these values are available in the SDK, making it easier for you.
-
The search will only run when you call the
stream()
method, which will then lazily-load each page of results into a stream. - This is the pattern for iterating through all results (across pages) covered in the Searching for assets portion of the SDK documentation.
POST /api/meta/task/search | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
|
GUID
of the asset for which you want to retrieve tag propagation tasks.- Specify the task type; in this example, we're retrieving tasks for monitoring propagation after a tag has been added to the asset.
- Specify the task status; here, we're checking for any pending tag propagation tasks for the given asset.
- This is the default sort order for tag propagation tasks search.