Skip to main content

entity

Creates, updates, deletes, gets or lists an entity resource.

Overview

Nameentity
TypeResource
Idazure.purview_data_map.entity

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
attributesobjectThe attributes of the struct.
entityGuidstringThe GUID of the entity.
entityStatusstringStatus of the entity - can be active or deleted. Deleted entities are not removed. Known values are: "ACTIVE" and "DELETED". (ACTIVE, DELETED)
lastModifiedTSstringETag for concurrency control.
removePropagationsOnEntityDeletebooleanDetermines if propagations will be removed on entity deletion.
typeNamestringThe name of the type.
validityPeriodsarrayAn array of time boundaries indicating validity periods.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_classificationselectguid, classification_name, endpointGet classification for a given entity represented by a GUID.
getselectguid, endpointminExtInfo, ignoreRelationshipsGet complete definition of an entity given its GUID.
get_by_unique_attributeselecttype_name, endpointminExtInfo, ignoreRelationships, attr:qualifiedNameGet complete definition of an entity given its type and unique attribute. In addition to the typeName path parameter, attribute key-value pair(s) can be provided in the following format: attr:=. NOTE: The attrName and attrValue should be unique across entities, eg. qualifiedName. The REST request would look something like this: GET /v2/entity/uniqueAttribute/type/aType?attr:aTypeAttribute=someValue.
get_by_idsselectendpointminExtInfo, ignoreRelationshipsList entities in bulk identified by its GUIDs.
create_or_updateinsertendpointbusinessAttributeUpdateBehavior, collectionIdCreate or update an entity. Existing entity is matched using its unique guid if supplied or by its unique attributes eg: qualifiedName. Map and array of collections are not well supported. E.g., array>, array>. For each contact type, the maximum number of contacts is 20.
update_by_unique_attributeupdatetype_name, endpointattr:qualifiedNameUpdate entity partially - Allow a subset of attributes to be updated on an entity which is identified by its type and unique attribute eg: Referenceable.qualifiedName. Null updates are not possible. In addition to the typeName path parameter, attribute key-value pair(s) can be provided in the following format: attr:=. NOTE: The attrName and attrValue should be unique across entities, eg. qualifiedName. The REST request would look something like this: PUT /v2/entity/uniqueAttribute/type/aType?attr:aTypeAttribute=someValue.
create_or_updatereplaceendpointbusinessAttributeUpdateBehavior, collectionIdCreate or update an entity. Existing entity is matched using its unique guid if supplied or by its unique attributes eg: qualifiedName. Map and array of collections are not well supported. E.g., array>, array>. For each contact type, the maximum number of contacts is 20.
remove_classificationdeleteguid, classification_name, endpointDelete a given classification from an existing entity represented by a GUID.
remove_classification_by_unique_attributedeletetype_name, classification_name, endpointattr:qualifiedNameDelete a given classification from an entity identified by its type and unique attributes.
remove_business_metadata_attributesdeletebusiness_metadata_name, guid, endpointDelete business metadata attributes from an entity.
deletedeleteguid, endpointDelete an entity identified by its GUID.
delete_by_unique_attributedeletetype_name, endpointattr:qualifiedNameDelete an entity identified by its type and unique attributes. In addition to the typeName path parameter, attribute key-value pair(s) can be provided in the following format: attr:=. NOTE: The attrName and attrValue should be unique across entities, eg. qualifiedName. The REST request would look something like this: DELETE /v2/entity/uniqueAttribute/type/aType?attr:aTypeAttribute=someValue.
batch_deletedeleteendpointDelete a list of entities in bulk identified by their GUIDs or unique attributes.
update_attribute_by_idexecguid, name, endpointUpdate entity partially - create or update entity attribute identified by its GUID. Supports only primitive attribute type and entity references. It does not support updating complex types like arrays, and maps. Null updates are not possible.
batch_create_or_updateexecendpointcollectionId, businessAttributeUpdateBehaviorCreate or update entities in bulk. Existing entity is matched using its unique guid if supplied or by its unique attributes eg: qualifiedName. Map and array of collections are not well supported. E.g., array>, array>. For each contact type, the maximum number of contacts is 20.
get_classificationsexecguid, endpointList classifications for a given entity represented by a GUID.
add_classificationsexecguid, endpointAdd classifications to an existing entity represented by a GUID.
update_classificationsexecguid, endpointUpdate classifications to an existing entity represented by a guid.
get_headerexecguid, endpointGet entity header given its GUID.
get_business_metadata_templateexecendpointGet the sample Template for uploading/creating bulk BusinessMetaData.
add_classificationexecendpointAssociate a classification to multiple entities in bulk.
add_classifications_by_unique_attributeexectype_name, endpointattr:qualifiedNameAdd classification to the entity identified by its type and unique attributes.
update_classifications_unique_by_attributeexectype_name, endpointattr:qualifiedNameUpdate classification on an entity identified by its type and unique attributes.
batch_set_classificationsexecendpointSet classifications on entities in bulk.
batch_get_by_unique_attributesexectype_name, endpointminExtInfo, ignoreRelationships, attr_N:qualifiedNameBulk API to retrieve list of entities identified by its unique attributes. In addition to the typeName path parameter, attribute key-value pair(s) can be provided in the following format typeName=&attr_1:=&attr_2:=&attr_3:=\ NOTE: The attrName should be an unique attribute for the given entity-type. The REST request would look something like this GET /v2/entity/bulk/uniqueAttribute/type/hive_db?attr_1:qualifiedName=db1@cl1&attr_2:qualifiedName=db2@cl1 Note: at least one unique attribute must be provided.
remove_business_metadataexecguid, endpointRemove business metadata from an entity.
add_or_update_business_metadataexecguid, endpointisOverwriteAdd business metadata to an entity.
add_or_update_business_metadata_attributesexecbusiness_metadata_name, guid, endpointAdd or update business metadata attributes.
import_business_metadataexecendpoint, fileUpload the file for creating Business Metadata in BULK.
remove_labelsexecguid, endpointDelete given labels to a given entity.
set_labelsexecguid, endpointSet labels to a given entity.
add_labelexecguid, endpointAdd given labels to a given entity.
remove_labels_by_unique_attributeexectype_name, endpointattr:qualifiedNameDelete given labels to a given entity identified by its type and unique attribute. If labels is null/empty, no labels will be removed. If any labels in labels set are non-existing labels, they will be ignored, only existing labels will be removed. In addition to the typeName path parameter, attribute key-value pair(s) can be provided in the following format: attr:=. NOTE: The attrName and attrValue should be unique across entities, eg. qualifiedName. The REST request would look something like this: DELETE /v2/entity/uniqueAttribute/type/aType?attr:aTypeAttribute=someValue.
set_labels_by_unique_attributeexectype_name, endpointattr:qualifiedNameSet labels to a given entity identified by its type and unique attributes. If labels is null/empty, existing labels will all be removed. In addition to the typeName path parameter, attribute key-value pair(s) can be provided in the following format: attr:=. NOTE: The attrName and attrValue should be unique across entities, eg. qualifiedName. The REST request would look something like this: POST /v2/entity/uniqueAttribute/type/aType?attr:aTypeAttribute=someValue.
add_labels_by_unique_attributeexectype_name, endpointattr:qualifiedNameAdd given labels to a given entity identified by its type and unique attributes. If labels is null/empty, no labels will be added. In addition to the typeName path parameter, attribute key-value pair(s) can be provided in the following format: attr:=. NOTE: The attrName and attrValue should be unique across entities, eg. qualifiedName. The REST request would look something like this: PUT /v2/entity/uniqueAttribute/type/aType?attr:aTypeAttribute=someValue.
move_entities_to_collectionexeccollectionId, endpointMove existing entities to the target collection.

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
business_metadata_namestringBusinessMetadata name. Required.
classification_namestringThe name of the classification. Required.
collectionIdstringThe collection where entities will be moved to. Required.
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 entity. Required.
namestringThe name of the attribute. Required.
type_namestringThe name of the type. Required.
attr:qualifiedNamestringThe qualified name of the entity. (This is only an example. qualifiedName can be changed to other unique attributes). Default value is None.
attr_N:qualifiedNamestringQualified name of an entity. E.g. to find 2 entities you can set attrs_1:qualifiedName=db1@cl1&attrs_2:qualifiedName=db2@cl1. (This is only an example. qualifiedName can be changed to other unique attributes). Default value is None.
businessAttributeUpdateBehaviorstringUsed to define the update behavior for business attributes when updating entities. Known values are: "ignore", "replace", and "merge". Default value is None.
collectionIdstringThe collection where entities will be moved to. Only specify a value if you need to move an entity to another collection. Default value is None.
ignoreRelationshipsbooleanWhether to ignore relationship attributes. Default value is None.
isOverwritebooleanWhether to overwrite the existing business metadata on the entity or not, default is false. Default value is None.
minExtInfobooleanWhether to return minimal information for referred entities. Default value is None.

SELECT examples

Get classification for a given entity represented by a GUID.

SELECT
attributes,
entityGuid,
entityStatus,
lastModifiedTS,
removePropagationsOnEntityDelete,
typeName,
validityPeriods
FROM azure.purview_data_map.entity
WHERE guid = '{{ guid }}' -- required
AND classification_name = '{{ classification_name }}' -- required
AND endpoint = '{{ endpoint }}' -- required
;

INSERT examples

Create or update an entity. Existing entity is matched using its unique guid if supplied or by its unique attributes eg: qualifiedName. Map and array of collections are not well supported. E.g., array>, array>. For each contact type, the maximum number of contacts is 20.

INSERT INTO azure.purview_data_map.entity (
referredEntities,
entity,
endpoint,
businessAttributeUpdateBehavior,
collectionId
)
SELECT
'{{ referredEntities }}',
'{{ entity }}',
'{{ endpoint }}',
'{{ businessAttributeUpdateBehavior }}',
'{{ collectionId }}'
RETURNING
guidAssignments,
mutatedEntities,
partialUpdatedEntities
;

UPDATE examples

Update entity partially - Allow a subset of attributes to be updated on an entity which is identified by its type and unique attribute eg: Referenceable.qualifiedName. Null updates are not possible. In addition to the typeName path parameter, attribute key-value pair(s) can be provided in the following format: attr:=. NOTE: The attrName and attrValue should be unique across entities, eg. qualifiedName. The REST request would look something like this: PUT /v2/entity/uniqueAttribute/type/aType?attr:aTypeAttribute=someValue.

UPDATE azure.purview_data_map.entity
SET
referredEntities = '{{ referredEntities }}',
entity = '{{ entity }}'
WHERE
type_name = '{{ type_name }}' --required
AND endpoint = '{{ endpoint }}' --required
AND attr:qualifiedName = '{{ attr:qualifiedName}}'
RETURNING
guidAssignments,
mutatedEntities,
partialUpdatedEntities;

REPLACE examples

Create or update an entity. Existing entity is matched using its unique guid if supplied or by its unique attributes eg: qualifiedName. Map and array of collections are not well supported. E.g., array>, array>. For each contact type, the maximum number of contacts is 20.

REPLACE azure.purview_data_map.entity
SET
referredEntities = '{{ referredEntities }}',
entity = '{{ entity }}'
WHERE
endpoint = '{{ endpoint }}' --required
AND businessAttributeUpdateBehavior = '{{ businessAttributeUpdateBehavior}}'
AND collectionId = '{{ collectionId}}'
RETURNING
guidAssignments,
mutatedEntities,
partialUpdatedEntities;

DELETE examples

Delete a given classification from an existing entity represented by a GUID.

DELETE FROM azure.purview_data_map.entity
WHERE guid = '{{ guid }}' --required
AND classification_name = '{{ classification_name }}' --required
AND endpoint = '{{ endpoint }}' --required
;

Lifecycle Methods

Update entity partially - create or update entity attribute identified by its GUID. Supports only primitive attribute type and entity references. It does not support updating complex types like arrays, and maps. Null updates are not possible.

EXEC azure.purview_data_map.entity.update_attribute_by_id 
@guid='{{ guid }}' --required,
@name='{{ name }}' --required,
@endpoint='{{ endpoint }}' --required
;