type_definition
Creates, updates, deletes, gets or lists a type_definition resource.
Overview
| Name | type_definition |
| Type | Resource |
| Id | azure.purview_data_map.type_definition |
Fields
The following fields are returned by SELECT queries:
- get_by_id
- get_by_name
- get
| Name | Datatype | Description |
|---|---|---|
name | string | The name of the type definition. |
attributeDefs | array | An array of attribute definitions. |
category | string | The 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) |
createTime | integer | The created time of the record. |
createdBy | string | The user who created the record. |
dateFormatter | object | The date format. |
defaultValue | string | The default value. |
description | string | The description of the type definition. |
elementDefs | array | An array of enum element definitions. |
endDef1 | object | The 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. |
endDef2 | object | The 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. |
entityTypes | array | Specifying 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. |
guid | string | The GUID of the type definition. |
lastModifiedTS | string | ETag for concurrency control. |
options | object | The options for the type definition. |
relationshipAttributeDefs | array | An array of relationship attributes. |
relationshipCategory | string | The 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) |
relationshipLabel | string | The label of the relationship. |
serviceType | string | The service type. |
subTypes | array | An array of sub types. |
superTypes | array | An array of super types. |
typeVersion | string | The version of the type. |
updateTime | integer | The update time of the record. |
updatedBy | string | The user who updated the record. |
version | integer | The version of the record. |
| Name | Datatype | Description |
|---|---|---|
name | string | The name of the type definition. |
attributeDefs | array | An array of attribute definitions. |
category | string | The 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) |
createTime | integer | The created time of the record. |
createdBy | string | The user who created the record. |
dateFormatter | object | The date format. |
defaultValue | string | The default value. |
description | string | The description of the type definition. |
elementDefs | array | An array of enum element definitions. |
endDef1 | object | The 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. |
endDef2 | object | The 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. |
entityTypes | array | Specifying 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. |
guid | string | The GUID of the type definition. |
lastModifiedTS | string | ETag for concurrency control. |
options | object | The options for the type definition. |
relationshipAttributeDefs | array | An array of relationship attributes. |
relationshipCategory | string | The 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) |
relationshipLabel | string | The label of the relationship. |
serviceType | string | The service type. |
subTypes | array | An array of sub types. |
superTypes | array | An array of super types. |
typeVersion | string | The version of the type. |
updateTime | integer | The update time of the record. |
updatedBy | string | The user who updated the record. |
version | integer | The version of the record. |
| Name | Datatype | Description |
|---|---|---|
businessMetadataDefs | array | businessMetadataDefs. |
classificationDefs | array | An array of classification definitions. |
entityDefs | array | An array of entity definitions. |
enumDefs | array | An array of enum definitions. |
relationshipDefs | array | An array of relationship definitions. |
structDefs | array | An array of struct definitions. |
termTemplateDefs | array | An array of term template definitions. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_by_id | select | guid, endpoint | Get the type definition for the given GUID. | |
get_by_name | select | name, endpoint | Get the type definition by its name (unique). | |
get | select | endpoint | includeTermTemplate, type | List all type definitions in bulk. |
delete | delete | name, endpoint | Delete API for type identified by its name. | |
batch_delete | delete | endpoint | Delete API for all types in bulk. | |
get_business_metadata_by_id | exec | guid, endpoint | Get the businessMetadata definition for the given guid. | |
get_business_metadata_by_name | exec | name, endpoint | Get the businessMetadata definition by it's name (unique). | |
get_classification_by_id | exec | guid, endpoint | Get the classification definition for the given GUID. | |
get_classification_by_name | exec | name, endpoint | Get the classification definition by its name (unique). | |
get_entity_by_id | exec | guid, endpoint | Get the Entity definition for the given GUID. | |
get_entity_by_name | exec | name, endpoint | Get the entity definition by its name (unique). | |
get_enum_by_id | exec | guid, endpoint | Get the enum definition for the given GUID. | |
get_enum_by_name | exec | name, endpoint | Get the enum definition by its name (unique). | |
get_relationship_by_id | exec | guid, endpoint | Get the relationship definition for the given GUID. | |
get_relationship_by_name | exec | name, endpoint | Get the relationship definition by its name (unique). | |
get_struct_by_id | exec | guid, endpoint | Get the struct definition for the given GUID. | |
get_struct_by_name | exec | name, endpoint | Get the struct definition by its name (unique). | |
get_headers | exec | endpoint | includeTermTemplate, type | List all type definitions returned as a list of minimal information header. |
get_term_template_by_id | exec | guid, endpoint | Get the term template definition for the given GUID. | |
get_term_template_by_name | exec | name, endpoint | Get the term template definition by its name (unique). | |
batch_create | exec | endpoint | Create all atlas type definitions in bulk. Please avoid recreating existing types. | |
batch_update | exec | endpoint | Update 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.
| Name | Datatype | Description |
|---|---|---|
endpoint | string | The service endpoint host (no scheme), e.g. myaccount.table.cosmos.azure.com:443 - value of the client endpoint parameter. (default: ) |
guid | string | The globally unique identifier of the term template. Required. |
name | string | The unique name of the term template. Required. |
includeTermTemplate | boolean | Whether include termtemplatedef when return all typedefs. This is always true when search filter type=term_template. Default value is None. |
type | string | Typedef 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_by_id
- get_by_name
- get
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
;
Get the type definition by its name (unique).
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 name = '{{ name }}' -- required
AND endpoint = '{{ endpoint }}' -- required
;
List all type definitions in bulk.
SELECT
businessMetadataDefs,
classificationDefs,
entityDefs,
enumDefs,
relationshipDefs,
structDefs,
termTemplateDefs
FROM azure.purview_data_map.type_definition
WHERE endpoint = '{{ endpoint }}' -- required
AND includeTermTemplate = '{{ includeTermTemplate }}'
AND type = '{{ type }}'
;
DELETE examples
- delete
- batch_delete
Delete API for type identified by its name.
DELETE FROM azure.purview_data_map.type_definition
WHERE name = '{{ name }}' --required
AND endpoint = '{{ endpoint }}' --required
;
Delete API for all types in bulk.
DELETE FROM azure.purview_data_map.type_definition
WHERE endpoint = '{{ endpoint }}' --required
;
Lifecycle Methods
- get_business_metadata_by_id
- get_business_metadata_by_name
- get_classification_by_id
- get_classification_by_name
- get_entity_by_id
- get_entity_by_name
- get_enum_by_id
- get_enum_by_name
- get_relationship_by_id
- get_relationship_by_name
- get_struct_by_id
- get_struct_by_name
- get_headers
- get_term_template_by_id
- get_term_template_by_name
- batch_create
- batch_update
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
;
Get the businessMetadata definition by it's name (unique).
EXEC azure.purview_data_map.type_definition.get_business_metadata_by_name
@name='{{ name }}' --required,
@endpoint='{{ endpoint }}' --required
;
Get the classification definition for the given GUID.
EXEC azure.purview_data_map.type_definition.get_classification_by_id
@guid='{{ guid }}' --required,
@endpoint='{{ endpoint }}' --required
;
Get the classification definition by its name (unique).
EXEC azure.purview_data_map.type_definition.get_classification_by_name
@name='{{ name }}' --required,
@endpoint='{{ endpoint }}' --required
;
Get the Entity definition for the given GUID.
EXEC azure.purview_data_map.type_definition.get_entity_by_id
@guid='{{ guid }}' --required,
@endpoint='{{ endpoint }}' --required
;
Get the entity definition by its name (unique).
EXEC azure.purview_data_map.type_definition.get_entity_by_name
@name='{{ name }}' --required,
@endpoint='{{ endpoint }}' --required
;
Get the enum definition for the given GUID.
EXEC azure.purview_data_map.type_definition.get_enum_by_id
@guid='{{ guid }}' --required,
@endpoint='{{ endpoint }}' --required
;
Get the enum definition by its name (unique).
EXEC azure.purview_data_map.type_definition.get_enum_by_name
@name='{{ name }}' --required,
@endpoint='{{ endpoint }}' --required
;
Get the relationship definition for the given GUID.
EXEC azure.purview_data_map.type_definition.get_relationship_by_id
@guid='{{ guid }}' --required,
@endpoint='{{ endpoint }}' --required
;
Get the relationship definition by its name (unique).
EXEC azure.purview_data_map.type_definition.get_relationship_by_name
@name='{{ name }}' --required,
@endpoint='{{ endpoint }}' --required
;
Get the struct definition for the given GUID.
EXEC azure.purview_data_map.type_definition.get_struct_by_id
@guid='{{ guid }}' --required,
@endpoint='{{ endpoint }}' --required
;
Get the struct definition by its name (unique).
EXEC azure.purview_data_map.type_definition.get_struct_by_name
@name='{{ name }}' --required,
@endpoint='{{ endpoint }}' --required
;
List all type definitions returned as a list of minimal information header.
EXEC azure.purview_data_map.type_definition.get_headers
@endpoint='{{ endpoint }}' --required,
@includeTermTemplate={{ includeTermTemplate }},
@type='{{ type }}'
;
Get the term template definition for the given GUID.
EXEC azure.purview_data_map.type_definition.get_term_template_by_id
@guid='{{ guid }}' --required,
@endpoint='{{ endpoint }}' --required
;
Get the term template definition by its name (unique).
EXEC azure.purview_data_map.type_definition.get_term_template_by_name
@name='{{ name }}' --required,
@endpoint='{{ endpoint }}' --required
;
Create all atlas type definitions in bulk. Please avoid recreating existing types.
EXEC azure.purview_data_map.type_definition.batch_create
@endpoint='{{ endpoint }}' --required
@@json=
'{
"businessMetadataDefs": "{{ businessMetadataDefs }}",
"classificationDefs": "{{ classificationDefs }}",
"entityDefs": "{{ entityDefs }}",
"enumDefs": "{{ enumDefs }}",
"relationshipDefs": "{{ relationshipDefs }}",
"structDefs": "{{ structDefs }}",
"termTemplateDefs": "{{ termTemplateDefs }}"
}'
;
Update all types in bulk, changes detected in the type definitions would be persisted.
EXEC azure.purview_data_map.type_definition.batch_update
@endpoint='{{ endpoint }}' --required
@@json=
'{
"businessMetadataDefs": "{{ businessMetadataDefs }}",
"classificationDefs": "{{ classificationDefs }}",
"entityDefs": "{{ entityDefs }}",
"enumDefs": "{{ enumDefs }}",
"relationshipDefs": "{{ relationshipDefs }}",
"structDefs": "{{ structDefs }}",
"termTemplateDefs": "{{ termTemplateDefs }}"
}'
;