Skip to main content

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.

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
client.tasks.select() // (1)
// (2)
.where(AtlanTask.ENTITY_GUID.eq("f65e3da2-6ec2-4ff5-8f0b-b6eba640df24"))
.where(AtlanTask.TYPE.eq(AtlanTaskType.CLASSIFICATION_PROPAGATION_ADD))
.where(AtlanTask.STATUS.match(AtlanTaskStatus.PENDING.getValue()))
.stream() // (3)
.forEach(task -> { // (4)
log.info("Task: {}", task);
});
  1. To search across all tasks, you can use the tasks.select() convenience method on a client.

  2. 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.

  3. The search will only run when you call the stream() method, which will then lazily-load each page of results into a stream.

  4. This is the pattern for iterating through all results (across pages) covered in the Searching for assets portion of the SDK documentation.

Was this page helpful?