Partager via


LineageOperations Class

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through

PurviewCatalogClient's

<xref:lineage> attribute.

Inheritance
builtins.object
LineageOperations

Constructor

LineageOperations(*args, **kwargs)

Methods

get_lineage_by_unique_attribute

Returns lineage info about entity.

In addition to the typeName path parameter, attribute key-value pair(s) can be provided in the following format

attr:[attrName]=[attrValue]

NOTE: The attrName and attrValue should be unique across entities, eg. qualifiedName.

get_lineage_graph

Get lineage info of the entity specified by GUID.

next_page_lineage

Return immediate next page lineage info about entity with pagination.

get_lineage_by_unique_attribute

Returns lineage info about entity.

In addition to the typeName path parameter, attribute key-value pair(s) can be provided in the following format

attr:[attrName]=[attrValue]

NOTE: The attrName and attrValue should be unique across entities, eg. qualifiedName.

get_lineage_by_unique_attribute(type_name: str, *, direction: str, depth: int | None = 3, width: int | None = 10, include_parent: bool | None = None, get_derived_lineage: bool | None = None, **kwargs: Any) -> MutableMapping[str, Any]

Parameters

Name Description
type_name
Required
str

The name of the type.

Keyword-Only Parameters

Name Description
direction
str

The direction of the lineage, which could be INPUT, OUTPUT or BOTH. Known values are: "BOTH", "INPUT", and "OUTPUT".

depth
int

The number of hops for lineage. Default value is 3.

width
int

The number of max expanding width in lineage. Default value is 10.

include_parent

True to include the parent chain in the response. Default value is None.

get_derived_lineage

True to include derived lineage in the response. Default value is None.

Returns

Type Description
<xref:JSON>

JSON object

Exceptions

Type Description

Examples


   # response body for status code(s): 200
   response.json() == {
       "baseEntityGuid": "str",  # Optional. The GUID of the base entity.
       "childrenCount": 0,  # Optional. The number of children node.
       "guidEntityMap": {
           "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.
           }
       },
       "includeParent": bool,  # Optional. True to return the parent of the base
         entity.
       "lineageDepth": 0,  # Optional. The depth of lineage.
       "lineageDirection": "str",  # Optional. The enum of lineage direction. Known
         values are: "INPUT", "OUTPUT", "BOTH".
       "lineageWidth": 0,  # Optional. The width of lineage.
       "parentRelations": [
           {
               "childEntityId": "str",  # Optional. The GUID of child
                 entity.
               "parentEntityId": "str",  # Optional. The GUID of parent
                 entity.
               "relationshipId": "str"  # Optional. The GUID of
                 relationship.
           }
       ],
       "relations": [
           {
               "fromEntityId": "str",  # Optional. The GUID of from-entity.
               "relationshipId": "str",  # Optional. The GUID of
                 relationship.
               "toEntityId": "str"  # Optional. The GUID of to-entity.
           }
       ],
       "widthCounts": {
           "str": {
               "str": {}  # Optional. The entity count in specific
                 direction.
           }
       }
   }

get_lineage_graph

Get lineage info of the entity specified by GUID.

get_lineage_graph(guid: str, *, direction: str, depth: int | None = 3, width: int | None = 10, include_parent: bool | None = None, get_derived_lineage: bool | None = None, **kwargs: Any) -> MutableMapping[str, Any]

Parameters

Name Description
guid
Required
str

The globally unique identifier of the entity.

Keyword-Only Parameters

Name Description
direction
str

The direction of the lineage, which could be INPUT, OUTPUT or BOTH. Known values are: "BOTH", "INPUT", and "OUTPUT".

depth
int

The number of hops for lineage. Default value is 3.

width
int

The number of max expanding width in lineage. Default value is 10.

include_parent

True to include the parent chain in the response. Default value is None.

get_derived_lineage

True to include derived lineage in the response. Default value is None.

Returns

Type Description
<xref:JSON>

JSON object

Exceptions

Type Description

Examples


   # response body for status code(s): 200
   response.json() == {
       "baseEntityGuid": "str",  # Optional. The GUID of the base entity.
       "childrenCount": 0,  # Optional. The number of children node.
       "guidEntityMap": {
           "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.
           }
       },
       "includeParent": bool,  # Optional. True to return the parent of the base
         entity.
       "lineageDepth": 0,  # Optional. The depth of lineage.
       "lineageDirection": "str",  # Optional. The enum of lineage direction. Known
         values are: "INPUT", "OUTPUT", "BOTH".
       "lineageWidth": 0,  # Optional. The width of lineage.
       "parentRelations": [
           {
               "childEntityId": "str",  # Optional. The GUID of child
                 entity.
               "parentEntityId": "str",  # Optional. The GUID of parent
                 entity.
               "relationshipId": "str"  # Optional. The GUID of
                 relationship.
           }
       ],
       "relations": [
           {
               "fromEntityId": "str",  # Optional. The GUID of from-entity.
               "relationshipId": "str",  # Optional. The GUID of
                 relationship.
               "toEntityId": "str"  # Optional. The GUID of to-entity.
           }
       ],
       "widthCounts": {
           "str": {
               "str": {}  # Optional. The entity count in specific
                 direction.
           }
       }
   }

next_page_lineage

Return immediate next page lineage info about entity with pagination.

next_page_lineage(guid: str, *, direction: str, get_derived_lineage: bool | None = None, offset: int | None = None, limit: int | None = None, **kwargs: Any) -> MutableMapping[str, Any]

Parameters

Name Description
guid
Required
str

The globally unique identifier of the entity.

Keyword-Only Parameters

Name Description
direction
str

The direction of the lineage, which could be INPUT, OUTPUT or BOTH. Known values are: "BOTH", "INPUT", and "OUTPUT".

get_derived_lineage

True to include derived lineage in the response. Default value is None.

offset
int

The offset for pagination purpose. Default value is None.

limit
int

The page size - by default there is no paging. Default value is None.

Returns

Type Description
<xref:JSON>

JSON object

Exceptions

Type Description

Examples


   # response body for status code(s): 200
   response.json() == {
       "baseEntityGuid": "str",  # Optional. The GUID of the base entity.
       "childrenCount": 0,  # Optional. The number of children node.
       "guidEntityMap": {
           "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.
           }
       },
       "includeParent": bool,  # Optional. True to return the parent of the base
         entity.
       "lineageDepth": 0,  # Optional. The depth of lineage.
       "lineageDirection": "str",  # Optional. The enum of lineage direction. Known
         values are: "INPUT", "OUTPUT", "BOTH".
       "lineageWidth": 0,  # Optional. The width of lineage.
       "parentRelations": [
           {
               "childEntityId": "str",  # Optional. The GUID of child
                 entity.
               "parentEntityId": "str",  # Optional. The GUID of parent
                 entity.
               "relationshipId": "str"  # Optional. The GUID of
                 relationship.
           }
       ],
       "relations": [
           {
               "fromEntityId": "str",  # Optional. The GUID of from-entity.
               "relationshipId": "str",  # Optional. The GUID of
                 relationship.
               "toEntityId": "str"  # Optional. The GUID of to-entity.
           }
       ],
       "widthCounts": {
           "str": {
               "str": {}  # Optional. The entity count in specific
                 direction.
           }
       }
   }