/api/meta/entity/bulk (POST)
Link domain and assets
Link your asset to a domain for easy discovery and governance.
Add an asset to a domain
2.4.6
2.0.0
You can add an asset to a domain or update an existing domain by updating the asset's domainGUIDs
.
In the example below, we're adding a Snowflake table (MARKETING_SALES
) to the domain (Marketing
).
Java
Python
Kotlin Raw REST API
Add an asset to a domain DataDomain domain = DataDomain . findByName ( "Marketing" ). get ( 0 ); // (1)
Table table = Table . updater ( // (2)
"default/snowflake/1726834662/RAW/WIDEWORLDIMPORTERS/MARKETING_SALES" ,
"MARKETING_SALES" )
. domainGUID ( domain . getGuid ()) // (3)
. build ();
AssetMutationResponse response = table . save (); // (4)
You can retrieve a data domain by its human-readable name
using the findByName()
method.
Use the updater()
method of an asset by providing its qualifiedName
and name
.
To add the asset to the domain, assign the guid
of the domain to the domainGUID
attribute.
Finally, call the save()
method to apply the changes in Atlan.
Add an asset to a domain 1
2
3
4
5
6
7
8
9
10
11
12
13
14 from pyatlan.client.atlan import AtlanClient
from pyatlan.model.assets import Table ,
client = AtlanClient ()
domain = client . asset . find_domain_by_name ( "Marketing" ) # (1)
table = Table . updater ( # (2)
qualified_name = "default/snowflake/1726834662/RAW/WIDEWORLDIMPORTERS/MARKETING_SALES" ,
name = "MARKETING_SALES" ,
)
table . domain_g_u_i_ds = [ domain . guid ] # (3)
client . asset . save ( table ) # (4)
You can retrieve a data domain by its human-readable name
using the find_domain_by_name()
method.
Use the updater()
method of an asset by providing its qualifiedName
and name
.
To add the asset to the domain, assign the guid
of the domain to the asset.domain_g_u_i_ds
attribute.
Finally, call the save()
method to apply the changes in Atlan.
Add an asset to a domain val domain = DataDomain . findByName ( "Marketing" ) [ 0 ] // (1)
val table = Table . updater ( // (2)
"default/snowflake/1726834662/RAW/WIDEWORLDIMPORTERS/MARKETING_SALES" ,
"MARKETING_SALES" )
. domainGUID ( domain . getGuid ()) // (3)
. build ()
val response = table . save () // (4)
You can retrieve a data domain by its human-readable name
using the findByName()
method.
Use the updater()
method of an asset by providing its qualifiedName
and name
.
To add the asset to the domain, assign the guid
of the domain to the asset.domainGUID
attribute.
Finally, call the save()
method to apply the changes in Atlan.
POST /api/meta/entity/bulk 1
2
3
4
5
6
7
8
9
10
11
12
13
14 {
"entities" : [
{
"typeName" : "Table" , // (1)
"attributes" : {
"qualifiedName" : "default/snowflake/1726834662/RAW/WIDEWORLDIMPORTERS/MARKETING_SALES" , // (2)
"name" : "MARKETING_SALES" , // (3)
"domainGUIDs" : [
"db711647-99a9-4c50-93c5-fab0b992a0cc" // (4)
]
}
}
]
}
You need to specify the typeName
of the asset;
for this example, we're updating the domainGUIDs
for a Snowflake table.
You need to specify the qualifiedName
of the asset.
You need to specify the name
of the asset.
To add the asset to the domain, assign the guid
of the domain to the domainGUIDs
property.
Remove an asset from a domain
2.4.6
2.0.0
You can remove an asset from a domain by updating the asset's domainGUIDs
.
In the example below, we're removing a Snowflake table (MARKETING_SALES
) asset from the existing linked domain.
Java
Python
Kotlin Raw REST API
Remove an asset from a domain Table table = Table . updater ( // (1)
"default/snowflake/1726834662/RAW/WIDEWORLDIMPORTERS/MARKETING_SALES" ,
"MARKETING_SALES" )
. nullField ( Table . DOMAIN_GUI_DS . getAtlanFieldName ()) // (2)
. build ();
AssetMutationResponse response = table . save (); // (3)
Use the updater()
method of an asset by providing its qualifiedName
and name
.
To remove the asset from the domain, set the domainGUIDs
field as a nullField
on the builder.
Finally, call the save()
method to apply the changes in Atlan.
Remove an asset from a domain 1
2
3
4
5
6
7
8
9
10
11
12 from pyatlan.client.atlan import AtlanClient
from pyatlan.model.assets import Table ,
client = AtlanClient ()
table = Table . updater ( # (1)
qualified_name = "default/snowflake/1726834662/RAW/WIDEWORLDIMPORTERS/MARKETING_SALES" ,
name = "MARKETING_SALES" ,
)
table . domain_g_u_i_ds = [] # (2)
client . asset . save ( table ) # (3)
Use the updater()
method of an asset by providing its qualifiedName
and name
.
To remove the asset from the domain, assign the domain_g_u_i_ds
of the asset to an empty list ie.[]
.
Finally, call the save()
method to apply the changes in Atlan.
Remove an asset from a domain val table = Table . updater ( // (1)
"default/snowflake/1726834662/RAW/WIDEWORLDIMPORTERS/MARKETING_SALES" ,
"MARKETING_SALES" )
. nullField ( Table . DOMAIN_GUI_DS . atlanFieldName ) // (2)
. build ()
val response = table . save () // (3)
Use the updater()
method of an asset by providing its qualifiedName
and name
.
To remove the asset from the domain, set the domainGUIDs
field as a nullField
on the builder.
Finally, call the save()
method to apply the changes in Atlan.
POST /api/meta/entity/bulk 1
2
3
4
5
6
7
8
9
10
11
12 {
"entities" : [
{
"typeName" : "Table" , // (1)
"attributes" : {
"qualifiedName" : "default/snowflake/1726834662/RAW/WIDEWORLDIMPORTERS/MARKETING_SALES" , // (2)
"name" : "MARKETING_SALES" , // (3)
"domainGUIDs" : [] // (4)
}
}
]
}
You need to specify the typeName
of the asset;
for this example, we're updating the domainGUIDs
for a Snowflake table.
You need to specify the qualifiedName
of the asset.
You need to specify the name
of the asset.
To remove the asset from the domain, assign the domainGUIDs
property of the asset to the empty array.