Skip to main content

Manage data domains

Create new data domain

To create a new data domain:

Create a data domain
DataDomain domain = DataDomain.creator("Marketing") // (1)
.assetIcon(AtlanIcon.ROCKET) // (2)
.assetThemeHex(AtlanMeshColor.MAGENTA)
.build(); // (3)
AssetMutationResponse response = domain.save(client); // (4)
  1. You must provide a human-readable name for your data domain.
  2. You can chain onto the creator any other enrichment, for example choosing a different icon or color to represent the domain.
  3. You then need to build the object.
  4. You can then save() the object you've built to create the new data domain in Atlan. Because this operation will persist the asset in Atlan, you must provide it an AtlanClient through which to connect to the tenant.

Create new subdomain

To create a new subdomain:

Create a subdomain
DataDomain sub = DataDomain.creator("Social Marketing", // (1)
DataDomain.refByQualifiedName("default/domain/marketing")) // (2)
.build(); // (3)
AssetMutationResponse response = sub.save(client); // (4)
  1. You must provide a human-readable name for your data domain.
  2. To create subdomain, you must provide the parent domain with at least its qualifiedName.
  3. You can chain on other enrichment, like above, but ultimately then need to build the object.
  4. You can then save() the object you've built to create the new data subdomain in Atlan. Because this operation will persist the asset in Atlan, you must provide it an AtlanClient through which to connect to the tenant.

Retrieve data domain

To retrieve a data domain by its human-readable name:

Retrieve a data domain by its human-readable name
DataDomain domain = DataDomain.findByName( // (1)
client, "marketing", List.of("certificateStatus")
).get(0);
  1. Use DataDomain.findByName() method to retrieve a data domain by its human-readable name:

    • client through which to access a tenant.
    • name of the data domain.
    • (optional) a list of attributes to retrieve for the data domain, for example certificateStatus.

Update data domain

To update a data domain or subdomain:

Update a data domain
DataDomain domain = DataDomain.updater("default/domain/marketing", // (1)
"Marketing")
.userDescription("Now with a description!") // (2)
.build(); // (3)
AssetMutationResponse response = domain.save(client); // (4)
  1. Use the updater() method to update a data domain, providing the qualifiedName and name of the data domain.
  2. You can chain onto the updater any other enrichment, for example changing the domain's description.
  3. You then need to build the object.
  4. You can then save() the object you've built to update the data domain in Atlan. Because this operation will persist the asset in Atlan, you must provide it an AtlanClient through which to connect to the tenant.

Delete data domain

Soft-delete (archive)

To soft-delete, or archive, a data domain:

Delete a data domain
AssetDeletionResponse response = DataDomain.delete(client, "218c8144-dc39-43a5-b0c0-9eeb4d11e74a"); // (1)
  1. To archive a data domain in Atlan, call the DataDomain.delete() method with the GUID of the data domain. Because this operation will archive the asset in Atlan, you must provide it an AtlanClient through which to connect to the tenant.

Hard-delete (purge)

To permanently delete (purge) a data domain:

Purge a data domain
AssetDeletionResponse response = DataDomain.purge(client, "218c8144-dc39-43a5-b0c0-9eeb4d11e74a"); // (1)
  1. To permanently delete a data domain in Atlan, call the DataDomain.purge() method with the GUID of the data domain. Because this operation will remove the asset from Atlan, you must provide it an AtlanClient through which to connect to the tenant.
Was this page helpful?