RelationshipOperations Class

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through

PurviewCatalogClient's

<xref:relationship> attribute.

Inheritance
builtins.object
RelationshipOperations

Constructor

RelationshipOperations(*args, **kwargs)

Methods

create

Create a new relationship between entities.

delete

Delete a relationship between entities by its GUID.

get

Get relationship information between entities by its GUID.

update

Update an existing relationship between entities.

create

Create a new relationship between entities.

create(relationship: MutableMapping[str, Any], **kwargs: Any) -> MutableMapping[str, Any]

Parameters

Name Description
relationship
Required
<xref:JSON>

The AtlasRelationship object containing the information for the relationship to be created.

Returns

Type Description
<xref:JSON>

JSON object

Exceptions

Type Description

Examples


   # JSON input template you can fill out and use as your body input.
   relationship = {
       "attributes": {
           "str": {}  # Optional. The attributes of the struct.
       },
       "createTime": 0.0,  # Optional. The created time of the record.
       "createdBy": "str",  # Optional. The user who created the record.
       "end1": {
           "guid": "str",  # Optional. The GUID of the object.
           "typeName": "str",  # Optional. The name of the type.
           "uniqueAttributes": {
               "str": {}  # Optional. The unique attributes of the object.
           }
       },
       "end2": {
           "guid": "str",  # Optional. The GUID of the object.
           "typeName": "str",  # Optional. The name of the type.
           "uniqueAttributes": {
               "str": {}  # Optional. The unique attributes of the object.
           }
       },
       "guid": "str",  # Optional. The GUID of the relationship.
       "homeId": "str",  # Optional. The home ID of the relationship.
       "label": "str",  # Optional. The label of the relationship.
       "lastModifiedTS": "str",  # Optional. ETag for concurrency control.
       "provenanceType": 0.0,  # Optional. Used to record the provenance of an
         instance of an entity or relationship.
       "status": "str",  # Optional. The enum of relationship status. Known values
         are: "ACTIVE", "DELETED".
       "typeName": "str",  # Optional. The name of the type.
       "updateTime": 0.0,  # Optional. The update time of the record.
       "updatedBy": "str",  # Optional. The user who updated the record.
       "version": 0.0  # Optional. The version of the relationship.
   }

   # response body for status code(s): 200
   response.json() == {
       "attributes": {
           "str": {}  # Optional. The attributes of the struct.
       },
       "createTime": 0.0,  # Optional. The created time of the record.
       "createdBy": "str",  # Optional. The user who created the record.
       "end1": {
           "guid": "str",  # Optional. The GUID of the object.
           "typeName": "str",  # Optional. The name of the type.
           "uniqueAttributes": {
               "str": {}  # Optional. The unique attributes of the object.
           }
       },
       "end2": {
           "guid": "str",  # Optional. The GUID of the object.
           "typeName": "str",  # Optional. The name of the type.
           "uniqueAttributes": {
               "str": {}  # Optional. The unique attributes of the object.
           }
       },
       "guid": "str",  # Optional. The GUID of the relationship.
       "homeId": "str",  # Optional. The home ID of the relationship.
       "label": "str",  # Optional. The label of the relationship.
       "lastModifiedTS": "str",  # Optional. ETag for concurrency control.
       "provenanceType": 0.0,  # Optional. Used to record the provenance of an
         instance of an entity or relationship.
       "status": "str",  # Optional. The enum of relationship status. Known values
         are: "ACTIVE", "DELETED".
       "typeName": "str",  # Optional. The name of the type.
       "updateTime": 0.0,  # Optional. The update time of the record.
       "updatedBy": "str",  # Optional. The user who updated the record.
       "version": 0.0  # Optional. The version of the relationship.
   }

delete

Delete a relationship between entities by its GUID.

delete(guid: str, **kwargs: Any) -> None

Parameters

Name Description
guid
Required
str

The globally unique identifier of the relationship.

Returns

Type Description

None

Exceptions

Type Description

get

Get relationship information between entities by its GUID.

get(guid: str, *, extended_info: bool | None = None, **kwargs: Any) -> MutableMapping[str, Any]

Parameters

Name Description
guid
Required
str

The globally unique identifier of the relationship.

Keyword-Only Parameters

Name Description
extended_info

Limits whether includes extended information. Default value is None.

Returns

Type Description
<xref:JSON>

JSON object

Exceptions

Type Description

Examples


   # response body for status code(s): 200
   response.json() == {
       "referredEntities": {
           "str": {
               "attributes": {
                   "str": {}  # Optional. The attributes of the struct.
               },
               "classificationNames": [
                   "str"  # Optional. An array of classification names.
               ],
               "classifications": [
                   {
                       "attributes": {
                           "str": {}  # Optional. The attributes
                             of the struct.
                       },
                       "entityGuid": "str",  # Optional. The GUID of
                         the entity.
                       "entityStatus": "str",  # Optional. Status of
                         the entity - can be active or deleted. Deleted entities are not
                         removed from Atlas store. Known values are: "ACTIVE", "DELETED".
                       "lastModifiedTS": "str",  # Optional. ETag
                         for concurrency control.
                       "removePropagationsOnEntityDelete": bool,  #
                         Optional. Determines if propagations will be removed on entity
                         deletion.
                       "source": "str",  # Optional. indicate the
                         source who create the classification detail.
                       "sourceDetails": {
                           "str": {}  # Optional. more detail on
                             source information.
                       },
                       "typeName": "str",  # Optional. The name of
                         the type.
                       "validityPeriods": [
                           {
                               "endTime": "str",  #
                                 Optional. The end of the time boundary.
                               "startTime": "str",  #
                                 Optional. The start of the time boundary.
                               "timeZone": "str"  #
                                 Optional. The timezone of the time boundary.
                           }
                       ]
                   }
               ],
               "displayText": "str",  # Optional. The display text.
               "guid": "str",  # Optional. The GUID of the record.
               "isIncomplete": bool,  # Optional. Whether it is a shell
                 entity.
               "labels": [
                   "str"  # Optional. labels.
               ],
               "lastModifiedTS": "str",  # Optional. ETag for concurrency
                 control.
               "meaningNames": [
                   "str"  # Optional. An array of meanings.
               ],
               "meanings": [
                   {
                       "confidence": 0,  # Optional. The confidence
                         of the term assignment.
                       "createdBy": "str",  # Optional. The user who
                         created the record.
                       "description": "str",  # Optional. The
                         description of the term assignment.
                       "displayText": "str",  # Optional. The
                         display text.
                       "expression": "str",  # Optional. The
                         expression of the term assignment.
                       "relationGuid": "str",  # Optional. The GUID
                         of the relationship.
                       "source": "str",  # Optional. The source of
                         the term.
                       "status": "str",  # Optional. The status of
                         terms assignment. Known values are: "DISCOVERED", "PROPOSED",
                         "IMPORTED", "VALIDATED", "DEPRECATED", "OBSOLETE", "OTHER".
                       "steward": "str",  # Optional. The steward of
                         the term.
                       "termGuid": "str"  # Optional. The GUID of
                         the term.
                   }
               ],
               "status": "str",  # Optional. Status of the entity - can be
                 active or deleted. Deleted entities are not removed from Atlas store.
                 Known values are: "ACTIVE", "DELETED".
               "typeName": "str"  # Optional. The name of the type.
           }
       },
       "relationship": {
           "attributes": {
               "str": {}  # Optional. The attributes of the struct.
           },
           "createTime": 0.0,  # Optional. The created time of the record.
           "createdBy": "str",  # Optional. The user who created the record.
           "end1": {
               "guid": "str",  # Optional. The GUID of the object.
               "typeName": "str",  # Optional. The name of the type.
               "uniqueAttributes": {
                   "str": {}  # Optional. The unique attributes of the
                     object.
               }
           },
           "end2": {
               "guid": "str",  # Optional. The GUID of the object.
               "typeName": "str",  # Optional. The name of the type.
               "uniqueAttributes": {
                   "str": {}  # Optional. The unique attributes of the
                     object.
               }
           },
           "guid": "str",  # Optional. The GUID of the relationship.
           "homeId": "str",  # Optional. The home ID of the relationship.
           "label": "str",  # Optional. The label of the relationship.
           "lastModifiedTS": "str",  # Optional. ETag for concurrency control.
           "provenanceType": 0.0,  # Optional. Used to record the provenance of
             an instance of an entity or relationship.
           "status": "str",  # Optional. The enum of relationship status. Known
             values are: "ACTIVE", "DELETED".
           "typeName": "str",  # Optional. The name of the type.
           "updateTime": 0.0,  # Optional. The update time of the record.
           "updatedBy": "str",  # Optional. The user who updated the record.
           "version": 0.0  # Optional. The version of the relationship.
       }
   }

update

Update an existing relationship between entities.

update(relationship: MutableMapping[str, Any], **kwargs: Any) -> MutableMapping[str, Any]

Parameters

Name Description
relationship
Required
<xref:JSON>

The AtlasRelationship object containing the information for the relationship to be created.

Returns

Type Description
<xref:JSON>

JSON object

Exceptions

Type Description

Examples


   # JSON input template you can fill out and use as your body input.
   relationship = {
       "attributes": {
           "str": {}  # Optional. The attributes of the struct.
       },
       "createTime": 0.0,  # Optional. The created time of the record.
       "createdBy": "str",  # Optional. The user who created the record.
       "end1": {
           "guid": "str",  # Optional. The GUID of the object.
           "typeName": "str",  # Optional. The name of the type.
           "uniqueAttributes": {
               "str": {}  # Optional. The unique attributes of the object.
           }
       },
       "end2": {
           "guid": "str",  # Optional. The GUID of the object.
           "typeName": "str",  # Optional. The name of the type.
           "uniqueAttributes": {
               "str": {}  # Optional. The unique attributes of the object.
           }
       },
       "guid": "str",  # Optional. The GUID of the relationship.
       "homeId": "str",  # Optional. The home ID of the relationship.
       "label": "str",  # Optional. The label of the relationship.
       "lastModifiedTS": "str",  # Optional. ETag for concurrency control.
       "provenanceType": 0.0,  # Optional. Used to record the provenance of an
         instance of an entity or relationship.
       "status": "str",  # Optional. The enum of relationship status. Known values
         are: "ACTIVE", "DELETED".
       "typeName": "str",  # Optional. The name of the type.
       "updateTime": 0.0,  # Optional. The update time of the record.
       "updatedBy": "str",  # Optional. The user who updated the record.
       "version": 0.0  # Optional. The version of the relationship.
   }

   # response body for status code(s): 200
   response.json() == {
       "attributes": {
           "str": {}  # Optional. The attributes of the struct.
       },
       "createTime": 0.0,  # Optional. The created time of the record.
       "createdBy": "str",  # Optional. The user who created the record.
       "end1": {
           "guid": "str",  # Optional. The GUID of the object.
           "typeName": "str",  # Optional. The name of the type.
           "uniqueAttributes": {
               "str": {}  # Optional. The unique attributes of the object.
           }
       },
       "end2": {
           "guid": "str",  # Optional. The GUID of the object.
           "typeName": "str",  # Optional. The name of the type.
           "uniqueAttributes": {
               "str": {}  # Optional. The unique attributes of the object.
           }
       },
       "guid": "str",  # Optional. The GUID of the relationship.
       "homeId": "str",  # Optional. The home ID of the relationship.
       "label": "str",  # Optional. The label of the relationship.
       "lastModifiedTS": "str",  # Optional. ETag for concurrency control.
       "provenanceType": 0.0,  # Optional. Used to record the provenance of an
         instance of an entity or relationship.
       "status": "str",  # Optional. The enum of relationship status. Known values
         are: "ACTIVE", "DELETED".
       "typeName": "str",  # Optional. The name of the type.
       "updateTime": 0.0,  # Optional. The update time of the record.
       "updatedBy": "str",  # Optional. The user who updated the record.
       "version": 0.0  # Optional. The version of the relationship.
   }