Skip to main content

Manage custom metadata badges

You can use badges in Atlan to provide quick indicators of key signals from custom metadata. They appear in the Overview of the asset, rather than nested within the custom metadata tab.

Badges are a kind of asset

Badges are actually modeled as just another kind of asset in Atlan. This means all the standard CRUD operations apply to badges the same as any other asset.

Create badge

For example, to create a badge for custom metadata capturing a count of data quality checks that have run:

Build a badge
Badge badge = Badge.creator(client, // (1)
"DQ Count", // (2)
"Data Quality", // (3)
"Count") // (4)
.userDescription("How many data quality checks ran against this asset.") // (5)
.badgeCondition( // (6)
BadgeCondition.of(
BadgeComparisonOperator.GTE, // (7)
5, // (8)
BadgeConditionColor.GREEN)) // (9)
.badgeCondition(
BadgeCondition.of(
BadgeComparisonOperator.LT,
5,
BadgeConditionColor.YELLOW))
.badgeCondition(
BadgeCondition.of(
BadgeComparisonOperator.LTE,
2,
BadgeConditionColor.RED))
.build(); // (10)
AssetMutationResponse response = badge.save(client); // (11)
  1. Like with any other asset, use the creator() method to make sure you provide the minimal information required to create a badge. Because this operation may need to retrieve information from Atlan, you must provide it an AtlanClient through which to connect to the tenant.
  2. You must provide a name for the badge.
  3. You must specify the name of the custom metadata set the badge will summarize.
  4. You must provide the name of the custom metadata property within that set the badge will represent.
  5. You can optionally provide other details about the badge, like with any other asset. In this example we provide a description for the badge.
  6. You can then specify any number of conditions to represent in the badge.
  7. Each condition is comprised of an operator (standard mathematical comparisons),
  8. ...a value against which to compare the asset's value for the property,
  9. ...and the color to apply to the badge if the asset's value for the property matches the value (as compared through the operator). This can be one of the predefined colors, or any RGB-based hex value for a custom color.
  10. As with all other builder patterns, you must build() the object you've defined.
  11. The save() operation will actually create the badge within Atlan, including its conditions. Because this operation will persist the structure in Atlan, you must provide it an AtlanClient through which to connect to the tenant.

Delete badge

You can delete a badge at any time using:

Delete a badge
AssetDeletionResponse response = Badge.purge(client, "1c932bbb-fbe6-4bbc-9d0d-3df2f1fa4f81"); // (1)
  1. The purge() operation will permanently delete the badge, given the GUID of the badge. Because this operation will remove the structure from Atlan, you must provide it an AtlanClient through which to connect to the tenant.
Was this page helpful?