Package com.atlan.samples.loaders.models
Class SchemaDetails
- java.lang.Object
-
- com.atlan.samples.loaders.models.AssetDetails
-
- com.atlan.samples.loaders.models.SchemaDetails
-
public class SchemaDetails extends AssetDetails
Utility class for capturing the full details provided about a schema.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SchemaDetails.SchemaDetailsBuilder<C extends SchemaDetails,B extends SchemaDetails.SchemaDetailsBuilder<C,B>>
-
Nested classes/interfaces inherited from class com.atlan.samples.loaders.models.AssetDetails
AssetDetails.AssetDetailsBuilder<C extends AssetDetails,B extends AssetDetails.AssetDetailsBuilder<C,B>>
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
COL_SCHEMA
-
Constructor Summary
Constructors Modifier Constructor Description protected
SchemaDetails(SchemaDetails.SchemaDetailsBuilder<?,?> b)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SchemaDetails.SchemaDetailsBuilder<?,?>
builder()
protected boolean
canEqual(java.lang.Object other)
boolean
equals(java.lang.Object o)
java.lang.String
getDatabaseQualifiedName()
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.java.lang.String
getIdentity()
Retrieve the unique identity of this asset for deduplication across rows.java.lang.String
getName()
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.int
hashCode()
java.lang.String
toString()
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).-
Methods inherited from class com.atlan.samples.loaders.models.AssetDetails
appendAtlanTags, getAnnouncementMessage, getAnnouncementTitle, getAnnouncementType, getAtlanTags, getBoolean, getCertificate, getCertificateStatusMessage, getDescription, getFromRow, getMissingFields, getMultiValuedList, getOwnerGroups, getOwnerUsers, getRequiredEmptyFields, isStub, selectivelyUpdateCustomMetadata
-
-
-
-
Field Detail
-
COL_SCHEMA
public static final java.lang.String COL_SCHEMA
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
SchemaDetails
protected SchemaDetails(SchemaDetails.SchemaDetailsBuilder<?,?> b)
-
-
Method Detail
-
getIdentity
public java.lang.String getIdentity()
Retrieve the unique identity of this asset for deduplication across rows.- Specified by:
getIdentity
in classAssetDetails
- 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 connectionsrow
- 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 spreadsheetrow
- a row of data from the spreadsheet, as a map from column name to valuedelim
- 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 existbatchSize
- maximum number of schemas to create per batchupdateOnly
- 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
-
builder
public static SchemaDetails.SchemaDetailsBuilder<?,?> builder()
-
getDatabaseQualifiedName
public java.lang.String getDatabaseQualifiedName()
-
getName
public java.lang.String getName()
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classAssetDetails
-
canEqual
protected boolean canEqual(java.lang.Object other)
- Overrides:
canEqual
in classAssetDetails
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classAssetDetails
-
toString
public java.lang.String toString()
- Overrides:
toString
in classAssetDetails
-
-