Class CategoryEnrichmentDetails


  • public class CategoryEnrichmentDetails
    extends EnrichmentDetails
    Utility class for capturing the enrichment details provided about a glossary.
    • Method Detail

      • getIdentity

        public java.lang.String getIdentity()
        Retrieve the unique identity of this asset for deduplication across rows.
        Specified by:
        getIdentity in class AssetDetails
        Returns:
        String giving the unique identity of the asset
      • getPathFromIdentity

        public static java.lang.String getPathFromIdentity​(java.lang.String identity)
        Retrieve the path of the category from its identity.
        Parameters:
        identity - of the category
        Returns:
        only the path of the category
      • getNameFromPath

        public static java.lang.String getNameFromPath​(java.lang.String path)
        Retrieve the name of the category from its path.
        Parameters:
        path - of the category
        Returns:
        only the name of the category
      • getGlossaryNameFromIdentity

        public static java.lang.String getGlossaryNameFromIdentity​(java.lang.String identity)
        Retrieve the name of the glossary from a category's identity.
        Parameters:
        identity - of the category
        Returns:
        only the name of the glossary
      • getIdentity

        public static java.lang.String getIdentity​(java.lang.String categoryPath,
                                                   com.atlan.model.assets.Asset glossary)
        Construct the unique identity for the provided category path in a given glossary.
        Parameters:
        categoryPath - path of the category (@-delimited)
        glossary - glossary in which the category is expected to exist
        Returns:
        the unique identity (not qualifiedName) of the category
      • getFromRow

        public static CategoryEnrichmentDetails getFromRow​(GlossaryCache glossaryCache,
                                                           java.util.Map<java.lang.String,​java.lang.String> row,
                                                           java.lang.String delim)
        Build up details about the category on the provided row.
        Parameters:
        glossaryCache - cache of glossaries keyed by glossary name
        row - a row of data from the spreadsheet, as a map from column name to value
        delim - delimiter used in cells that can contain multiple values
        Returns:
        the category enrichment details for that row
      • upsert

        public static void upsert​(CategoryCache categoryCache,
                                  java.util.Map<java.lang.String,​CategoryEnrichmentDetails> categories,
                                  int batchSize,
                                  int level,
                                  boolean replaceClassifications,
                                  boolean replaceCM,
                                  boolean updateOnly)
        Create categories in bulk, if they do not exist, or update them if they do (idempotent).
        Parameters:
        categoryCache - a cache of categories
        categories - the set of categories to ensure exist
        batchSize - maximum number of categories to create per batch
        level - of categories to create
        replaceClassifications - if true, the classifications in the spreadsheet will overwrite all existing classifications on the asset; otherwise they will only be appended
        replaceCM - if true, the custom metadata in the spreadsheet will overwrite all custom metadata on the asset; otherwise only the attributes with values will be updated
        updateOnly - if true, only attempt to update existing assets, otherwise allow assets to be created as well
      • getGlossary

        public com.atlan.model.assets.Asset getGlossary()
      • getCategoryPath

        public java.lang.String getCategoryPath()