Connection delete package¶
The connection delete package deletes a connection and all its related assets.
Soft-delete (archive) assets¶
To soft-delete (archive) all assets in a connection:
Archive assets | |
---|---|
1 2 3 4 5 6 |
|
- The
ConnectionDelete
package will create a workflow to delete a connection and its assets using thecreator()
method. -
You need to provide the following:
- qualified name of the connection whose assets should be deleted.
- whether to permanently delete the connection and its assets
(hard-delete) (
true
), or only archive (soft-delete) them (false
).
-
Build the minimal package object.
- Convert the package into a
Workflow
object. -
Run the workflow using the
run()
method on the object you've created.Workflows run asynchronously
Remember that workflows run asynchronously. See the packages and workflows introduction for details on how to check the status and wait until the workflow has been completed.
Archive assets | |
---|---|
1 2 3 4 5 6 7 8 9 10 |
|
- The
ConnectionDelete
package will create a workflow to delete a connection and its assets. -
You need to provide the following:
- qualified name of the connection whose assets should be deleted.
- whether to permanently delete the connection and its assets
(hard-delete) (
True
), or only archive (soft-delete) them (False
).
-
Convert the package into a
Workflow
object. -
Run the workflow by invoking the
run()
method on the workflow client, passing the created object.Workflows run asynchronously
Remember that workflows run asynchronously. See the packages and workflows introduction for details on how to check the status and wait until the workflow has been completed.
Create the workflow via UI only
We recommend creating the workflow only via the UI. To rerun an existing workflow, see the steps below.
Hard-delete (purge) assets¶
Permanent and irreversible
A hard-delete (purge) is permanent and irreversible. Be certain that you want to entirely remove all of the assets in a connection before running in this way!
To hard-delete (purge) all assets in a connection:
Purge assets | |
---|---|
1 2 3 4 5 6 |
|
- The
ConnectionDelete
package will create a workflow to delete a connection and its assets using thecreator()
method. -
You need to provide the following:
- qualified name of the connection whose assets should be deleted.
- whether to permanently delete the connection and its assets
(hard-delete) (
true
), or only archive (soft-delete) them (false
).
-
Build the minimal package object.
- Convert the package into a
Workflow
object. -
Run the workflow using the
run()
method on the object you've created.Workflows run asynchronously
Remember that workflows run asynchronously. See the packages and workflows introduction for details on how to check the status and wait until the workflow has been completed.
Purge assets | |
---|---|
1 2 3 4 5 6 7 8 9 10 |
|
- The
ConnectionDelete
package will create a workflow to delete a connection and its assets. -
You need to provide the following:
- qualified name of the connection whose assets should be deleted.
- whether to permanently delete the connection and its assets
(hard-delete) (
True
), or only archive (soft-delete) them (False
).
-
Convert the package into a
Workflow
object. -
Run the workflow by invoking the
run()
method on the workflow client, passing the created object.Workflows run asynchronously
Remember that workflows run asynchronously. See the packages and workflows introduction for details on how to check the status and wait until the workflow has been completed.
Create the workflow via UI only
We recommend creating the workflow only via the UI. To rerun an existing workflow, see the steps below.
Re-run existing workflow¶
To re-run an existing connection delete workflow:
Re-run existing connection delete workflow | |
---|---|
1 2 3 4 |
|
- 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 theConnectionDelete
. (You can also specify the maximum number of resulting workflows you want to retrieve as results.) -
Once you've found the workflow you want to re-run, you can simply call the
rerun()
helper method on the workflow search result. TheWorkflowRunResponse
is just a subtype ofWorkflowResponse
so has the same helper method to monitor progress of the workflow run.- Optionally, you can use the
rerun(true)
method with idempotency to avoid re-running a workflow that is already in running or in a pending state. This will return details of the already running workflow if found, and by default, it is set tofalse
Workflows run asynchronously
Remember that workflows run asynchronously. See the packages and workflows introduction for details on how you can check the status and wait until the workflow has been completed.
- Optionally, you can use the
Re-run existing connection delete workflow | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 |
|
- 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 theConnectionDelete
. (You can also specify the maximum number of resulting workflows you want to retrieve as results.) -
Once you've found the workflow you want to re-run, you can simply call the workflow client
rerun()
method.- Optionally, you can use
rerun(idempotent=True)
to avoid re-running a workflow that is already in running or in a pending state. This will return details of the already running workflow if found, and by default, it is set toFalse
.
Workflows run asynchronously
Remember that workflows run asynchronously. See the packages and workflows introduction for details on how you can check the status and wait until the workflow has been completed.
- Optionally, you can use
Re-run existing connection delete workflow | |
---|---|
1 2 3 4 5 |
|
- 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 theConnectionDelete
. (You can also specify the maximum number of resulting workflows you want to retrieve as results.) -
Once you've found the workflow you want to re-run, you can simply call the
rerun()
helper method on the workflow search result. TheWorkflowRunResponse
is just a subtype ofWorkflowResponse
so has the same helper method to monitor progress of the workflow run.- Optionally, you can use the
rerun(true)
method with idempotency to avoid re-running a workflow that is already in running or in a pending state. This will return details of the already running workflow if found, and by default, it is set tofalse
Workflows run asynchronously
Remember that workflows run asynchronously. See the packages and workflows introduction for details on how you can check the status and wait until the workflow has been completed.
- Optionally, you can use the
Requires multiple steps through the raw REST API
- Find the existing workflow.
- Send through the resulting re-run request.
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 |
|
-
Searching by the
atlan-connection-delete
prefix will ensure you only find existing connection delete workflows.Name of the workflow
The name of the workflow will be nested within the
_source.metadata.name
property of the response object. (Remember since this is a search, there could be multiple results, so you may want to use the other details in each result to determine which workflow you really want.)
POST /api/service/workflows/submit | |
---|---|
100 101 102 103 104 |
|
- Send the name of the workflow as the
resourceName
to rerun it.