Skip to main content

type_definition

Creates, updates, deletes, gets or lists a type_definition resource.

Overview

Nametype_definition
TypeResource
Idazure.purview_data_map.type_definition

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringThe name of the type definition.
attributeDefsarrayAn array of attribute definitions.
categorystringThe enum of type category. Known values are: "PRIMITIVE", "OBJECT_ID_TYPE", "ENUM", "STRUCT", "CLASSIFICATION", "ENTITY", "ARRAY", "MAP", "RELATIONSHIP", and "TERM_TEMPLATE". (PRIMITIVE, OBJECT_ID_TYPE, ENUM, STRUCT, CLASSIFICATION, ENTITY, ARRAY, MAP, RELATIONSHIP, TERM_TEMPLATE)
createTimeintegerThe created time of the record.
createdBystringThe user who created the record.
dateFormatterobjectThe date format.
defaultValuestringThe default value.
descriptionstringThe description of the type definition.
elementDefsarrayAn array of enum element definitions.
endDef1objectThe relationshipEndDef represents an end of the relationship. The end of the relationship is defined by a type, an attribute name, cardinality and whether it is the container end of the relationship.
endDef2objectThe relationshipEndDef represents an end of the relationship. The end of the relationship is defined by a type, an attribute name, cardinality and whether it is the container end of the relationship.
entityTypesarraySpecifying a list of entityType names in the classificationDef, ensures that classifications can only be applied to those entityTypes. Any subtypes of the entity types inherit the restriction. Any classificationDef subtypes inherit the parents entityTypes restrictions. Any classificationDef subtypes can further restrict the parents entityTypes restrictions by specifying a subset of the entityTypes. An empty entityTypes list when there are no parent restrictions means there are no restrictions. An empty entityTypes list when there are parent restrictions means that the subtype picks up the parents restrictions. If a list of entityTypes are supplied, where one inherits from another, this will be rejected. This should encourage cleaner classificationsDefs.
guidstringThe GUID of the type definition.
lastModifiedTSstringETag for concurrency control.
optionsobjectThe options for the type definition.
relationshipAttributeDefsarrayAn array of relationship attributes.
relationshipCategorystringThe Relationship category determines the style of relationship around containment and lifecycle. UML terminology is used for the values. ASSOCIATION is a relationship with no containment. COMPOSITION and AGGREGATION are containment relationships. The difference being in the lifecycles of the container and its children. In the COMPOSITION case, the children cannot exist without the container. For AGGREGATION, the life cycles of the container and children are totally independent. Known values are: "ASSOCIATION", "AGGREGATION", and "COMPOSITION". (ASSOCIATION, AGGREGATION, COMPOSITION)
relationshipLabelstringThe label of the relationship.
serviceTypestringThe service type.
subTypesarrayAn array of sub types.
superTypesarrayAn array of super types.
typeVersionstringThe version of the type.
updateTimeintegerThe update time of the record.
updatedBystringThe user who updated the record.
versionintegerThe version of the record.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_by_idselectguid, endpointGet the type definition for the given GUID.
get_by_nameselectname, endpointGet the type definition by its name (unique).
getselectendpointincludeTermTemplate, typeList all type definitions in bulk.
deletedeletename, endpointDelete API for type identified by its name.
batch_deletedeleteendpointDelete API for all types in bulk.
get_business_metadata_by_idexecguid, endpointGet the businessMetadata definition for the given guid.
get_business_metadata_by_nameexecname, endpointGet the businessMetadata definition by it's name (unique).
get_classification_by_idexecguid, endpointGet the classification definition for the given GUID.
get_classification_by_nameexecname, endpointGet the classification definition by its name (unique).
get_entity_by_idexecguid, endpointGet the Entity definition for the given GUID.
get_entity_by_nameexecname, endpointGet the entity definition by its name (unique).
get_enum_by_idexecguid, endpointGet the enum definition for the given GUID.
get_enum_by_nameexecname, endpointGet the enum definition by its name (unique).
get_relationship_by_idexecguid, endpointGet the relationship definition for the given GUID.
get_relationship_by_nameexecname, endpointGet the relationship definition by its name (unique).
get_struct_by_idexecguid, endpointGet the struct definition for the given GUID.
get_struct_by_nameexecname, endpointGet the struct definition by its name (unique).
get_headersexecendpointincludeTermTemplate, typeList all type definitions returned as a list of minimal information header.
get_term_template_by_idexecguid, endpointGet the term template definition for the given GUID.
get_term_template_by_nameexecname, endpointGet the term template definition by its name (unique).
batch_createexecendpointCreate all atlas type definitions in bulk. Please avoid recreating existing types.
batch_updateexecendpointUpdate all types in bulk, changes detected in the type definitions would be persisted.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
endpointstringThe service endpoint host (no scheme), e.g. myaccount.table.cosmos.azure.com:443 - value of the client endpoint parameter. (default: )
guidstringThe globally unique identifier of the term template. Required.
namestringThe unique name of the term template. Required.
includeTermTemplatebooleanWhether include termtemplatedef when return all typedefs. This is always true when search filter type=term_template. Default value is None.
typestringTypedef name as search filter when get typedefs. Known values are: "PRIMITIVE", "OBJECT_ID_TYPE", "ENUM", "STRUCT", "CLASSIFICATION", "ENTITY", "ARRAY", "MAP", "RELATIONSHIP", and "TERM_TEMPLATE". Default value is None.

SELECT examples

Get the type definition for the given GUID.

SELECT
name,
attributeDefs,
category,
createTime,
createdBy,
dateFormatter,
defaultValue,
description,
elementDefs,
endDef1,
endDef2,
entityTypes,
guid,
lastModifiedTS,
options,
relationshipAttributeDefs,
relationshipCategory,
relationshipLabel,
serviceType,
subTypes,
superTypes,
typeVersion,
updateTime,
updatedBy,
version
FROM azure.purview_data_map.type_definition
WHERE guid = '{{ guid }}' -- required
AND endpoint = '{{ endpoint }}' -- required
;

DELETE examples

Delete API for type identified by its name.

DELETE FROM azure.purview_data_map.type_definition
WHERE name = '{{ name }}' --required
AND endpoint = '{{ endpoint }}' --required
;

Lifecycle Methods

Get the businessMetadata definition for the given guid.

EXEC azure.purview_data_map.type_definition.get_business_metadata_by_id 
@guid='{{ guid }}' --required,
@endpoint='{{ endpoint }}' --required
;