Manage workflows¶
Retrieve workflow¶
By ID¶
Retrieve an existing workflow by its ID:
Retrieve workflows by its type | |
---|---|
1 2 |
|
- You can search for existing workflows through the
WorkflowSearchRequest
class. - You can find workflows by their ID using the
findById()
helper method and providing the ID for one of the packages. In this example, we're retrieving a specific Snowflake miner package. Because this operation will retrieve information from Atlan, you must provide it anAtlanClient
through which to connect to the tenant.
Retrieve workflow by its ID | |
---|---|
1 2 3 4 5 6 7 |
|
- You can find a workflow by its identifier using the
find_by_id()
method of the workflow client, providing theid
for the specific workflow. In this example, we're retrieving theSnowflakeMiner
workflow.
Retrieve workflows by its type | |
---|---|
1 2 |
|
- You can search for existing workflows through the
WorkflowSearchRequest
class. - You can find workflows by their ID using the
findById()
helper method and providing the ID for one of the packages. In this example, we're retrieving a specific Snowflake miner package. Because this operation will retrieve information from Atlan, you must provide it anAtlanClient
through which to connect to the tenant.
Retrieve workflow by its ID | |
---|---|
1 2 3 4 |
|
- You can find a workflow by its identifier using the
FindByID()
method of the workflow client, providing theid
for the specific workflow. In this example, we're retrieving theSnowflakeMiner
workflow.
POST /api/service/workflows/indexsearch | |
---|---|
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 |
|
- You can find a workflow by its identifier. In this example, we're retrieving the
SnowflakeMiner
workflow.
By type¶
Retrieve existing workflows by its type:
Retrieve workflows by its type | |
---|---|
1 2 |
|
- You can search for existing workflows through the
WorkflowSearchRequest
class. - You can find workflows by their type using the
findByType()
helper method and providing the prefix for one of the packages. In this example, we do so for theSnowflakeMiner
. (You can also specify the maximum number of resulting workflows you want to retrieve as results.) Because this operation will retrieve information from Atlan, you must provide it anAtlanClient
through which to connect to the tenant.
Retrieve workflows by its type | |
---|---|
1 2 3 4 5 6 7 8 |
|
- You can find workflows by their type using the workflow client
find_by_type()
method and providing the prefix for one of the packages. In this example, we do so for theSnowflakeMiner
. (You can also specify the maximum number of resulting workflows you want to retrieve as results.)
Retrieve workflows by its type | |
---|---|
1 2 |
|
- You can search for existing workflows through the
WorkflowSearchRequest
class. - You can find workflows by their type using the
findByType()
helper method and providing the prefix for one of the packages. In this example, we do so for theSnowflakeMiner
. (You can also specify the maximum number of resulting workflows you want to retrieve as results.) Because this operation will retrieve information from Atlan, you must provide it anAtlanClient
through which to connect to the tenant.
Retrieve workflows by its type | |
---|---|
1 2 3 4 |
|
- You can find workflows by their type using the workflow client
FindByType()
method and providing the prefix for one of the packages. In this example, we do so for theSnowflakeMiner
. (You can also specify the maximum number of resulting workflows you want to retrieve as results.)
POST /api/service/workflows/indexsearch | |
---|---|
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 |
|
- Specify the maximum number of resulting workflows you want to retrieve as results.
- In this example, we do so for the
SnowflakeMiner
withregexp: atlan[-]snowflake[-]miner[-][0-9]{10}
.
Create workflow credentials¶
To create workflow credentials for example, for Snowflake:
Coming soon
Create workflow credentials | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
|
- Initialize the credential object for credential creation.
- You must provide a
name
for the credential being created. - You must specify the
connector_config_name
for the credential. - You must specify the
connector name
for the credential. - You must specify the
authentication type
of the credential. - You can provide the sensitive details such as the
username
,password
, andextras
when creating credentials. This behavior aligns with the Atlan workflow config. - You can specify the
host
andport
being used. -
To create workflow credentials using the
creator()
method. You need to provide the below params:credential
: thecredential
object is passed to create new credentials in Atlan. For example, in this case,snowflake_credential
serves as the credential object.test
: specify whether to validate the credentials (True
) or skip validation (False
) before creations. Defaults toTrue
Coming soon
POST /api/service/credentials?testCredential=true | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
|
- You must specify the
authType
for the credential. - You must provide a Human-readable name for your credential.
- You must specify the
connector
for the credential. - You must specify the
connectorConfigName
for the credential. - You can provide the sensitive details such as the
username
,password
, andextras
when creating credentials. - You can specify the
host
andport
being used.
Retrieve all workflow credentials¶
To retrive all workflow credentials for example, for Snowflake:
Coming soon
Retrieve all workflow credentials | |
---|---|
1 2 3 4 5 6 7 8 9 10 |
|
-
To retrieve workflow credentials using the
get_all()
method. When run without any parameters, it returns all existing records. You can also use following optional parameters to filter, limit, or paginate through the results:- (Optional)
filter
: filters records based on specific key-value criteria, such as{"connector": "snowflake"}
returns credentials for workflows using thesnowflake
connector. - (Optional)
limit
: restricts the maximum number of records returned in a single call, for example,limit=5
retrieves up to5
records only. - (Optional)
offset
: skips a specified number of records before starting retrieval, such asoffset=10
to skip the first10
records and retrieve from the11th
onward. - (Optional)
workflow_name
: retrieves credentials for a specific workflow. The name should match the workflow name as shown in the Atlan UI.
- (Optional)
Coming soon
GET api/service/credentials?filter=%7B%22name%22%3A%22atlan-snowflake-17891%22%7D&limit=1&offset=1 | |
---|---|
1 |
|
-
All details are in the URL itself.
URL-encoded filter
Note that the filter is URL-encoded. Decoded it would be:
{"name":"atlan-snowflake-17891"}
Update workflow source credentials¶
To update workflow source credentials for example, for Snowflake:
Update workflow source credentials | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 |
|
- You can retrieve the workflow credential object by providing its
GUID
. - You must specify the authentication type of the credential.
- You must provide the sensitive details such as the
username
,password
, andextra
when updating credentials. This behavior aligns with the Atlan workflow config update UI. - Build the minimal
Credential
object. - Now, use the
update()
method of theCredential
object to update this new credentials in Atlan after initially testing it for successful validation. Because this operation will update details in Atlan, you must provide it anAtlanClient
through which to connect to the tenant.
Update workflow source credentials | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
|
- You can retrieve the workflow credential object by providing its
GUID
. - You must specify the authentication type of the credential.
- You must provide the sensitive details such as the
username
,password
, andextras
when updating credentials. This behavior aligns with the Atlan workflow config update UI. - Now, pass the
credential
object to thetest_and_update()
method to update this new credentials in Atlan after initially testing it to confirm its successful validation.
Update workflow source credentials | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 |
|
- You can retrieve the workflow credential object by providing its
GUID
. - You must specify the authentication type of the credential.
- You must provide the sensitive details such as the
username
,password
, andextra
when updating credentials. This behavior aligns with the Atlan workflow config update UI. - Build the minimal
Credential
object. - Now, use the
update()
method of theCredential
object to update this new credentials in Atlan after initially testing it for successful validation. Because this operation will update details in Atlan, you must provide it anAtlanClient
through which to connect to the tenant.
GET /api/service/credentials/972a87c1-28d7-8bf2-896d-ea5bd3e9c691 | |
---|---|
1 |
|
- You can retrieve the workflow credential object by providing its
GUID
.
POST /api/service/credentials/972a87c1-28d7-8bf2-896d-ea5bd3e9c691/test | |
---|---|
1 |
|
- You can also test the existing credential authentication by providing its
GUID
.
POST /api/service/credentials/test | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
|
-
This example demonstrates how to test & update the source credentials for the
Snowflake
crawler (basic authentication). -
You can update the following credentials fields:
username
: update with the new username.password
: update with the new password.role
: update with the new role.warehouse
: update with the new warehouse.
Hard-delete an workflow credentials¶
Hard-deletes (also called a purge) are irreversible operations. The workflow credential is removed from Atlan entirely, so no longer appears in the UI and also no longer exists in Atlan's back-end.
To hard-delete (purge) an asset, you only need to provide the GUID for Snowflake:
Coming soon
Delete workflow credentials | |
---|---|
1 2 3 4 5 |
|
- The credentials.purge_by_guid() method returns
None
when the credentials deleted sucessfully.
Coming soon
POST api/service/credentials/972a87c1-28d7-8bf2-896d-ea5bd3e9c691/archive | |
---|---|
1 |
|
- Specify the GUID of the credential to be deleted:
api/service/credentials/{credential-guid}/archive
Update workflow configuration¶
To update workflow configuration for example, for Snowflake:
Coming soon
Update workflow configuration | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
|
- You can find a workflow by its identifier using the
find_by_id()
method of the workflow client, providing theid
for the specific workflow. In this example, we're retrieving theSnowflake
workflow for an update. - Retrieve the workflow template and specific task that you need to update.
- Update the specific workflow parameter. In this example,
we're enabling lineage for the
Snowflake
workflow. - Convert the workflow search result object to a workflow object
and pass that to the
update()
method to actually perform the workflow update in Atlan.
Coming soon
Update workflow configuration | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
|
- You can find a workflow by its identifier using the
FindByID()
method of the workflow client, providing theid
for the specific workflow. In this example, we're retrieving theSnowflake
workflow for an update. - Retrieve the workflow template and specific task that you need to update.
- Update the specific workflow parameter. In this example,
we're enabling lineage for the
Snowflake
workflow. - Convert the workflow search result object to a workflow object
and pass that to the
Update()
method to actually perform the workflow update in Atlan.
Retrieve workflow run¶
By ID¶
Retrieve an existing workflow run by its ID:
Coming soon
Retrieve workflow run by its ID | |
---|---|
1 2 3 4 5 6 7 |
|
- You can find a workflow run by its identifier using the
find_run_by_id()
method of the workflow client, providing theid
for the specific workflow run. In this example, we're retrieving the existingSnowflakeMiner
workflow run.
Coming soon
Retrieve workflow run by its ID | |
---|---|
1 2 3 4 |
|
- You can find a workflow run by its identifier using the
FindRunByID()
method of the workflow client, providing theid
for the specific workflow run. In this example, we're retrieving the existingSnowflakeMiner
workflow run.
POST /api/service/runs/indexsearch | |
---|---|
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 |
|
- You can find a workflow run by its identifier.
In this example, we're retrieving the existing
SnowflakeMiner
workflow run.
By status and time range¶
Retrieve existing workflow runs by their status and time range:
Coming soon
Retrieve workflow runs by status and time range | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 |
|
-
To search for workflow runs based on their status and time range, use the
find_runs_by_status_and_time_range()
method with the following parameters:status
(required): filters workflow runs by their status. Acceptable values are defined in theAtlanWorkflowPhase
enum.
For example, settingstatus=[AtlanWorkflowPhase.SUCCESS, AtlanWorkflowPhase.FAILED]
will retrieve workflow runs that have either asuccess
orfailed
status.started_at
(optional): Filters workflow runs based on their start time.
For example, settingstarted_at="now-6h"
will retrieve runs that started within the last 6 hours.finished_at
(optional): Filters workflow runs based on their finish time.
For example, settingfinished_at="now-1h"
will retrieve runs that finished within the last hour.from_
(optional): starting index of the search results (default:0
).size
(optional): maximum number of search results to return (default:100
).
Not sure about Elasticsearch time range format?
Check out the Elasticsearch date math guide for more details.
Coming soon
Coming soon
POST /api/service/runs/indexsearch | |
---|---|
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 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
|
- Starting index of the search results (default:
0
). - Maximum number of search results to return (default:
100
). - You can find workflow runs by their status.
In this example, we're retrieving workflow runs that have either a
Succeeded
orFailed
status. - You can use a
Range
query to filter workflow runs based on their start time. For example, setting"status.startedAt": {"gte": "now-6h"}
will retrieve runs that started within the last 6 hours. - You can use a
Range
query to filter workflow runs based on their finish time.
For example, setting"status.finishedAt": {"gte": "now-1h"}
will retrieve runs that finished within the last hour.
Not sure about Elasticsearch time range format?
Check out the Elasticsearch date math guide for more details.
Retrieve all workflow runs¶
By their phase:¶
To retrieve all existing workflow runs based on
their phase, such as Succeeded
, Running
, Failed
, etc
Coming soon
Retrieve all workflow runs by their phase | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 |
|
-
To retrieve all existing workflow runs based on their phase, you need to specify:
- name of the workflow as displayed in the UI, eg:
atlan-snowflake-miner-1714638976
. - phase of the given workflow (e.g:
Succeeded
,Running
,Failed
, etc) - starting index of the search results (default:
0
). - maximum number of search results to return (default:
100
).
- name of the workflow as displayed in the UI, eg:
Coming soon
Retrieve all workflow runs by their phase | |
---|---|
1 2 3 4 5 6 7 8 9 |
|
-
To retrieve all existing workflow runs based on their phase, you need to specify:
- name of the workflow as displayed in the UI, eg:
atlan-snowflake-miner-1714638976
. - phase of the given workflow (e.g:
AtlanWorkflowPhaseSuccess
,AtlanWorkflowPhaseRunning
,AtlanWorkflowPhaseFailed
, etc) - starting index of the search results (default:
0
). - maximum number of search results to return (default:
100
).
- name of the workflow as displayed in the UI, eg:
POST /api/service/runs/indexsearch | |
---|---|
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 |
|
- Starting index of the search results (default:
0
). - Maximum number of search results to return (default:
100
). - Name of the workflow as displayed in the UI, eg:
atlan-snowflake-miner-1714638976
. - Phase of the given workflow (e.g:
Succeeded
,Running
,Failed
, etc)
Stop a running workflow¶
To stop a running workflow:
Coming soon
Retrieve all workflow runs by their phase | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 |
|
- First, retrieve all existing running workflows.
- From the list of existing running workflows, provide
the identifier of the specific workflow run to the
client.workflow.stop()
method, e.g:atlan-snowflake-miner-1714638976-9wfxz
.
Coming soon
Retrieve all workflow runs by their phase | |
---|---|
1 2 3 4 5 6 7 8 9 10 |
|
- First, retrieve all existing running workflows.
- From the list of existing running workflows, provide
the identifier of the specific workflow run to the
ctx.WorkflowClient.Stop()
method, e.g:atlan-snowflake-miner-1714638976-9wfxz
.
Delete a workflow¶
To delete a workflow:
Delete a workflow | |
---|---|
1 2 3 |
|
- To delete an existing workflow, specify the name of the workflow as displayed in the UI (e.g:
atlan-snowflake-miner-1714638976
).
Delete a workflow | |
---|---|
1 2 3 4 5 6 7 |
|
-
To delete an existing workflow, specify:
- name of the workflow as displayed in the
UI (e.g:
atlan-snowflake-miner-1714638976
).
- name of the workflow as displayed in the
UI (e.g:
Delete a workflow | |
---|---|
1 2 3 |
|
- To delete an existing workflow, specify the name of the workflow as displayed in the UI (e.g:
atlan-snowflake-miner-1714638976
).
Delete a workflow | |
---|---|
1 |
|
-
To delete an existing workflow, specify:
- name of the workflow as displayed in the
UI (e.g:
atlan-snowflake-miner-1714638976
).
- name of the workflow as displayed in the
UI (e.g: