Packages and workflows introduction
In Atlan, packages define the workflows you can run to retrieve metadata from various sources.
This means the helper method to run a workflow will return immediately, before the workflow itself has finished running. If you want to wait until the workflow is finished you'll need to use other helper methods to check the status and wait accordingly.
Explore the list of individual packages currently supported through our SDKs. Each package section includes examples demonstrating how to build a workflow from scratch and execute it on Atlan.
Block until workflow completion
To block until the workflow has completed running:
- Java
- Python
- Kotlin
...
WorkflowResponse response = workflow.run(client); // (1)
AtlanWorkflowPhase state = response.monitorStatus(log); // (2)
-
Every package returns a
Workflowobject, from which you canrun()the workflow. This call will return almost immediately with some metadata about the workflow run—it will not wait until the workflow has completed running. Because this operation will execute work in Atlan, you must provide it anAtlanClientthrough which to connect to the tenant. -
There is a
monitorStatus()method on the response of a workflow run that you can use to wait until the workflow has completed. When this method finally returns, it will give the state of the workflow when it completed (for example, success or failure).The method comes in two variations:
- one that takes an slf4j logger (in this example) and will log its status periodically
- and another that takes no arguments and doesn't do any logging
import logging
from pyatlan.client.atlan import AtlanClient
client = AtlanClient()
LOGGER = logging.getLogger(__name__)
LOGGER.setLevel(logging.DEBUG)
...
response = client.workflow.run(workflow) # (1)
state = client.workflow.monitor( # (2)
workflow_response=response,
logger=LOGGER,
workflow_name="atlan-snowflake-1744600804" # (3)
)
-
Each package returns a
Workflowobject, which you can subsequently pass to therun()method of the workflow client. This call will return almost immediately with some metadata about the workflow run—it will not wait until the workflow has completed running. -
Use the
monitor()method on the workflow client to wait until the workflow has completed. When this method returns, it provides the final state of the workflow, indicating whether it was successful or failed.The method comes in two variations:
- one that takes a logger (in this example) and will log its status periodically.
- and another that takes no arguments and doesn't do any logging.
-
You can now monitor any existing workflow directly by specifying its
workflow_name, as displayed in the Atlan UI. In this case, you only need to pass theworkflow_nameas a parameter to themonitor()method—no need for aworkflow_response.
...
val response = workflow.run(client) // (1)
val state = response.monitorStatus(log) // (2)
-
Every package returns a
Workflowobject, from which you canrun()the workflow. This call will return almost immediately with some metadata about the workflow run—it will not wait until the workflow has completed running. Because this operation will execute work in Atlan, you must provide it anAtlanClientthrough which to connect to the tenant. -
There is a
monitorStatus()method on the response of a workflow run that you can use to wait until the workflow has completed. When this method finally returns, it will give the state of the workflow when it completed (for example, success or failure).The method comes in two variations:
- one that takes an slf4j logger (in this example) and will log its status periodically
- and another that takes no arguments and doesn't do any logging