Atlas Type Definition Models#
Type Definitions#
A type definition enables you to create custom types.
To create a custom asset type, use the EntityTypeDef
To create a custom classification, use the ClassificationTypeDef
To create a custom business metadata definition use StructType and TypeCategory.
biz_def = AtlasStructDef(
name="operations",
category=TypeCategory.BUSINESSMETADATA,
attributeDefs=[
AtlasAttributeDef(name="expenseCode",options={"maxStrLength": "500","applicableEntityTypes":"[\"DataSet\"]"}),
AtlasAttributeDef(name="criticality",options={"maxStrLength": "500", "applicableEntityTypes":"[\"DataSet\"]"})
]
)
To upload a type definition use the AtlasClient or PurviewClient upload_typedefs.
# Upload an entity definition
client.upload_typedefs(entityDefs=[entity_def])
# Upload a business metadata definition
client.upload_typedefs(businessMetadataDefs=[biz_def])
# Upload a classification definition
client.upload_typedefs(classificationDefs=[classif_def])
# etc.
|
An implementation of AtlasEntityDef |
|
An implementation of AtlasClassificationDef |
|
An implementation of AtlasRelationshipDef. |
|
An implementation of an Atlas Cardinality used in relationshipDefs. |
|
An implemention of AtlasStructDef. |
|
An implementation of an Atlas TypeCategory used in relationshipDefs. |
|
An implementation of AtlasBaseTypeDef. |
|
An implementation of AtlasAttributeDef. |
Atlas Relationship Definitions#
These are utility classes when dealing with defining relationships.
|
An implementation of AtlasRelationshipAttributeDef. |
|
An implementation of AtlasRelationshipEndDef. |
|
A helper for creating a Parent end def (e.g. |
|
A helper for creating a Child end def (e.g. |