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).
You can retrieve a data domain by its human-readable name using the findByName() method. Because this operation will look up the domain in Atlan, you must provide it an AtlanClient through which to connect to the tenant.
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. Because this operation will persist the asset in Atlan, you must provide it an AtlanClient through which to connect to the tenant.
You can retrieve a data domain by its human-readable name using the findByName() method. Because this operation will look up the domain in Atlan, you must provide it an AtlanClient through which to connect to the tenant.
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. Because this operation will persist the asset in Atlan, you must provide it an AtlanClient through which to connect to the tenant.
You can retrieve all assets associated with a domain by filtering on the domainGUIDs.
In the example below, we retrieve all assets linked to the (Marketing) domain.
You can retrieve a data domain by its human-readable name using the findByName() method. Because this operation will look up the domain in Atlan, you must provide it an AtlanClient through which to connect to the tenant.
Query all assets linked to the domain using client.assets.select().where(Asset.DOMAIN_GUIDS.eq(domainGuid)).
Include specific attributes (e.g., Asset.NAME, Asset.QUALIFIED_NAME) in the results using .includeOnResults().
Process the retrieved assets and print any specific attributes you need, such as name and qualifiedName in this example.
You can retrieve a data domain by its human-readable name using the findByName() method. Because this operation will look up the domain in Atlan, you must provide it an AtlanClient through which to connect to the tenant.
Query all assets linked to the domain using FluentSearch.search().where(Asset.DOMAIN_GUIDS.eq(domainGuid)).
Include specific attributes (e.g., Asset.NAME, Asset.QUALIFIED_NAME) in the results using .includeOnResults().
Process the retrieved assets and print any specific attributes you need, such as name and qualifiedName in this example.
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.
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. Because this operation will persist the asset in Atlan, you must provide it an AtlanClient through which to connect to the tenant.
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. Because this operation will persist the asset in Atlan, you must provide it an AtlanClient through which to connect to the tenant.