Class SchemaDetails


  • public class SchemaDetails
    extends AssetDetails
    Utility class for capturing the full details provided about a schema.
    • 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
      • getQualifiedName

        public static java.lang.String getQualifiedName​(java.util.Map<ConnectionDetails,​java.lang.String> connectionCache,
                                                        java.util.Map<java.lang.String,​java.lang.String> row)
        Construct a schema's qualifiedName from the row of data and cache of connections.
        Parameters:
        connectionCache - cache of connections
        row - of data
        Returns:
        the qualifiedName for the schema on that row of data
      • getFromRow

        public static SchemaDetails getFromRow​(java.util.Map<ConnectionDetails,​java.lang.String> connectionCache,
                                               java.util.Map<java.lang.String,​java.lang.String> row,
                                               java.lang.String delim)
        Build up details about the schema on the provided row.
        Parameters:
        connectionCache - a cache of connections that have first been resolved across the spreadsheet
        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 schema details for that row
      • upsert

        public static java.util.Set<java.lang.String> upsert​(java.util.Map<java.lang.String,​SchemaDetails> schemas,
                                                             int batchSize,
                                                             boolean updateOnly)
        Create schemas in bulk, if they do not exist, or update them if they do (idempotent).
        Parameters:
        schemas - the set of schemas to ensure exist
        batchSize - maximum number of schemas to create per batch
        updateOnly - if true, only attempt to update existing assets, otherwise allow assets to be created as well
        Returns:
        qualifiedNames of all parent databases in which assets were created or updated
      • getDatabaseQualifiedName

        public java.lang.String getDatabaseQualifiedName()
      • getName

        public java.lang.String getName()
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class AssetDetails
      • canEqual

        protected boolean canEqual​(java.lang.Object other)
        Overrides:
        canEqual in class AssetDetails