Manage lineage¶
Create lineage between assets¶
To create lineage between assets, you need to create a Process
entity.
Input and output assets must already exist
Note that the assets you reference as the inputs and outputs of the process must already exist, before creating the process.
Create lineage between assets | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
|
- Use the
creator()
method to initialize the object with all necessary attributes for creating it. - Provide a name for how the process will be shown in the UI.
-
Provide the
qualifiedName
of the connection that ran the process.Tips for the connection
The process itself must be created within a connection for both access control and icon labelling. Use a connection
qualifiedName
that indicates the system that ran the process:- You could use the same connection
qualifiedName
as the source system, if it was the source system "pushing" data to the target(s). - You could use the same connection
qualifiedName
as the target system, if it was the target system "pulling" data from the source(s). - You could use a different connection
qualifiedName
from either source or target, if there is a system in-between doing the processing (for example an ETL engine or orchestrator).
- You could use the same connection
-
(Optional) Provide the unique ID of the process within that connection. This could be the unique DAG ID for an orchestrator, for example. Since it is optional, you can also send
null
and the SDK will generate a unique ID for you based on the unique combination of inputs and outputs for the process.Use your own ID if you can
While the SDK can generate this ID for you, since it is based on the unique combination of inputs and outputs the ID can change if those inputs or outputs change. This could result in extra processes in lineage as this process itself changes over time.
By using your own ID for the process, any changes that occur in that process over time (even if the inputs or outputs change) the same single process in Atlan will be updated.
-
Provide the list of inputs to the process. Note that each of these is only a
Reference
to an asset, not a full asset object. For a reference you only need (in addition to the type of asset) either:- its GUID (for the static
<Type>.refByGuid()
method) - its
qualifiedName
(for the static<Type>.refByQualifiedName()
method)
- its GUID (for the static
-
Provide the list of outputs to the process. Note that each of these is again only a
Reference
to an asset. - (Optional) Provide the parent
LineageProcess
in which this process ran (for example, if this process is a subprocess of some higher-level process). If this is a top-level process, you can also sendnull
for this parameter (as in this example). - (Optional) You can also add other properties to the lineage process, such as SQL code that runs within the process.
- (Optional) You can also provide a link to the process, which will provide a button to click to go to that link from the Atlan UI when viewing the process in Atlan.
- Call the
save()
method to actually create the process. - The response will include that single lineage process asset that was created.
- The response will also include the 5 data assets (3 inputs, 2 outputs) that were updated.
Create lineage between assets | |
---|---|
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 |
|
- Use the
create()
method to initialize the object with all necessary attributes for creating it. - Provide a name for how the process will be shown in the UI.
-
Provide the
qualified_name
of the connection that ran the process.Tips for the connection
The process itself must be created within a connection for both access control and icon labelling. Use a connection
qualified_name
that indicates the system that ran the process:- You could use the same connection
qualified_name
as the source system, if it was the source system "pushing" data to the target(s). - You could use the same connection
qualified_name
as the target system, if it was the target system "pulling" data from the source(s). - You could use a different connection
qualified_name
from either source or target, if there is a system in-between doing the processing (for example an ETL engine or orchestrator).
- You could use the same connection
-
(Optional) Provide the unique ID of the process within that connection. This could be the unique DAG ID for an orchestrator, for example. Since it is optional, you can also leave it out and the SDK will generate a unique ID for you based on the unique combination of inputs and outputs for the process.
Use your own ID if you can
While the SDK can generate this ID for you, since it is based on the unique combination of inputs and outputs the ID can change if those inputs or outputs change. This could result in extra processes in lineage as this process itself changes over time.
By using your own ID for the process, any changes that occur in that process over time (even if the inputs or outputs change) the same single process in Atlan will be updated.
-
Provide the list of inputs to the process. Note that each of these is only a
Reference
to an asset, not a full asset object. For a reference you only need (in addition to the type of asset) either:- its GUID (for the
ref_by_guidB()
method) - its
qualifiedName
(for theref_by_qualified_name()
method)
- its GUID (for the
-
Provide the list of outputs to the process. Note that each of these is again only a
Reference
to an asset. - (Optional) Provide the parent
Process
in which this process ran (for example, if this process is a subprocess of some higher-level process). If this is a top-level process, you can also sendnull
for this parameter (as in this example). - (Optional) You can also add other properties to the lineage process, such as SQL code that runs within the process.
- (Optional) You can also provide a link to the process, which will provide a button to click to go to that link from the Atlan UI when viewing the process in Atlan.
- Call the
save()
method to actually create the process. - Check that a
Process
was created. - Check that only 1
Process
was created. - Check that tables were updated.
- Check that 5 tables (3 inputs, 2 outputs) were updated.
POST /api/meta/entity/bulk | |
---|---|
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 |
|
- All assets must be wrapped in an
entities
array. - You must provide the exact type name for a
Process
asset (case-sensitive). - You must provide a name of the integration process.
- You must provide a unique
qualifiedName
for the integration process (case-sensitive). - You must list all of the input assets to the process. These can be referenced by GUID or by
qualifiedName
. - You must list all of the output assets from the process. These can also be referenced by either GUID or
qualifiedName
.
Remove lineage between assets¶
To remove lineage between assets, you need to delete the Process
entity that links them:
Remove lineage between assets | |
---|---|
1 2 3 4 5 6 7 |
|
- Provide the GUID for the process to the static
Asset.purge()
method. - The response will include that single process that was purged.
- If you want to confirm the details, you'll need to type-check and then cast the generic
Asset
returned into aProcess
.
Remove lineage between assets | |
---|---|
1 2 3 4 5 6 7 8 |
|
- Invoke the
asset.purge_by_guid
to delete theProcess
. - Provide the GUID of the process to be purged.
- Check that a
Process
was purged. - Check that only 1
Process
was purged.
DELETE /api/meta/entity/bulk?guid=6fa1f0d0-5720-4041-8243-c2a5628b68bf&deleteType=PURGE | |
---|---|
1 |
|
- All of the details are in the request URL, there is no payload for a deletion. The GUID for the process itself (not any of its inputs or outputs) is what is listed in the URL.
More information
This will irreversibly delete the process, and therefore the lineage it represented. The input and output assets themselves will also be updated, to no longer be linked to the (now non-existent) process. However, the input and output assets themselves will continue to exist in Atlan.