Delete custom metadata
Atlan currently preserves details of custom metadata in its audit log. This allows Atlan to retain an audit trail of actions users took on custom metadata on each asset, even if the custom metadata definition itself is deleted.
However, this also places an upper limit on the number of custom metadata properties you can create in Atlan. Even if you delete the custom metadata definitions, any that you have previously defined will still take up "space" within this limit.
More details
By default this is ~1000 properties. If you see an error like the following, it means you have reached this limit:
{
"errorCode": "ATLAS-500-00-001",
"errorMessage": "Unable to push entity audits to ES",
"errorCause": "[{type=mapper_parsing_exception, reason=failed to parse, caused_by={type=illegal_argument_exception, reason=Limit of total fields [1000] has been exceeded while adding new fields [5]}}]"
}
You will need to contact Atlan support to extend this threshold if you reach it.
To delete a custom metadata structure:
- Java
- Python
- Kotlin
- Raw REST API
CustomMetadataDef.purge(client, "RACI"); // (1)
- You only need to call the
CustomMetadataDef.purge()method with the human-readable name of the custom metadata structure, and it will be deleted. Because this operation will remove the structure from Atlan, you must provide it anAtlanClientthrough which to connect to the tenant.
from pyatlan.model.typedef import CustomMetadataDef
from pyatlan.client.atlan import AtlanClient
client = AtlanClient()
response = client.typedef.purge("RACI", CustomMetadataDef) # (1)
- You only need to call the
typedef.purge()method with the human-readable name of the custom metadata structure, and it will be deleted.
CustomMetadataDef.purge(client, "RACI") // (1)
- You only need to call the
CustomMetadataDef.purge()method with the human-readable name of the custom metadata structure, and it will be deleted. Because this operation will remove the structure from Atlan, you must provide it anAtlanClientthrough which to connect to the tenant.
When deleting the custom metadata structure using the raw API, you must use the hashed-string representation of its name in the API call.