relationship
Creates, updates, deletes, gets or lists a relationship resource.
Overview
| Name | relationship |
| Type | Resource |
| Id | azure.purview_data_map.relationship |
Fields
The following fields are returned by SELECT queries:
- get
| Name | Datatype | Description |
|---|---|---|
referredEntities | object | The referred entity header. |
relationship | object | Atlas relationship instance. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | guid, endpoint | extendedInfo | Get relationship information between entities by its GUID. |
create | insert | endpoint | Create a new relationship between entities. | |
update | update | endpoint | Update an existing relationship between entities. | |
delete | delete | guid, endpoint | Delete a relationship between entities by its GUID. |
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 relationship. Required. |
extendedInfo | boolean | Limits whether includes extended information. Default value is None. |
SELECT examples
- get
Get relationship information between entities by its GUID.
SELECT
referredEntities,
relationship
FROM azure.purview_data_map.relationship
WHERE guid = '{{ guid }}' -- required
AND endpoint = '{{ endpoint }}' -- required
AND extendedInfo = '{{ extendedInfo }}'
;
INSERT examples
- create
- Manifest
Create a new relationship between entities.
INSERT INTO azure.purview_data_map.relationship (
attributes,
typeName,
lastModifiedTS,
createTime,
createdBy,
end1,
end2,
guid,
homeId,
label,
provenanceType,
status,
updateTime,
updatedBy,
version,
endpoint
)
SELECT
'{{ attributes }}',
'{{ typeName }}',
'{{ lastModifiedTS }}',
{{ createTime }},
'{{ createdBy }}',
'{{ end1 }}',
'{{ end2 }}',
'{{ guid }}',
'{{ homeId }}',
'{{ label }}',
{{ provenanceType }},
'{{ status }}',
{{ updateTime }},
'{{ updatedBy }}',
{{ version }},
'{{ endpoint }}'
RETURNING
attributes,
createTime,
createdBy,
end1,
end2,
guid,
homeId,
label,
lastModifiedTS,
provenanceType,
status,
typeName,
updateTime,
updatedBy,
version
;
# Description fields are for documentation purposes
- name: relationship
props:
- name: endpoint
value: "{{ endpoint }}"
description: Required parameter for the relationship resource.
- name: attributes
value: "{{ attributes }}"
description: |
The attributes of the struct.
- name: typeName
value: "{{ typeName }}"
description: |
The name of the type.
- name: lastModifiedTS
value: "{{ lastModifiedTS }}"
description: |
ETag for concurrency control.
- name: createTime
value: {{ createTime }}
description: |
The created time of the record.
- name: createdBy
value: "{{ createdBy }}"
description: |
The user who created the record.
- name: end1
description: |
Reference to an object-instance of a type - like entity.
value:
guid: "{{ guid }}"
typeName: "{{ typeName }}"
uniqueAttributes: "{{ uniqueAttributes }}"
- name: end2
description: |
Reference to an object-instance of a type - like entity.
value:
guid: "{{ guid }}"
typeName: "{{ typeName }}"
uniqueAttributes: "{{ uniqueAttributes }}"
- name: guid
value: "{{ guid }}"
description: |
The GUID of the relationship.
- name: homeId
value: "{{ homeId }}"
description: |
The home ID of the relationship.
- name: label
value: "{{ label }}"
description: |
The label of the relationship.
- name: provenanceType
value: {{ provenanceType }}
description: |
Used to record the provenance of an instance of an entity or relationship.
- name: status
value: "{{ status }}"
description: |
The enum of relationship status. Known values are: "ACTIVE" and "DELETED".
valid_values: ['ACTIVE', 'DELETED']
- name: updateTime
value: {{ updateTime }}
description: |
The update time of the record.
- name: updatedBy
value: "{{ updatedBy }}"
description: |
The user who updated the record.
- name: version
value: {{ version }}
description: |
The version of the relationship.
UPDATE examples
- update
Update an existing relationship between entities.
UPDATE azure.purview_data_map.relationship
SET
attributes = '{{ attributes }}',
typeName = '{{ typeName }}',
lastModifiedTS = '{{ lastModifiedTS }}',
createTime = {{ createTime }},
createdBy = '{{ createdBy }}',
end1 = '{{ end1 }}',
end2 = '{{ end2 }}',
guid = '{{ guid }}',
homeId = '{{ homeId }}',
label = '{{ label }}',
provenanceType = {{ provenanceType }},
status = '{{ status }}',
updateTime = {{ updateTime }},
updatedBy = '{{ updatedBy }}',
version = {{ version }}
WHERE
endpoint = '{{ endpoint }}' --required
RETURNING
attributes,
createTime,
createdBy,
end1,
end2,
guid,
homeId,
label,
lastModifiedTS,
provenanceType,
status,
typeName,
updateTime,
updatedBy,
version;
DELETE examples
- delete
Delete a relationship between entities by its GUID.
DELETE FROM azure.purview_data_map.relationship
WHERE guid = '{{ guid }}' --required
AND endpoint = '{{ endpoint }}' --required
;