Skip to content

Issue Retrieving Lineage with Azure Purview API #291

@jguajardobravo

Description

@jguajardobravo

I am experiencing an issue when trying to retrieve lineage data using the Azure Purview API. I have tried several approaches, but none are working. Below is a snippet of the code I am using:

`# Retrieve complete lineage using the REST API
lineage_guid = "b9205209-..." # Replace with the GUID of the root entity for which you want to retrieve the lineage
url = f'https://{PURVIEW_ACCOUNT_NAME}.purview.azure.com/catalog/api/atlas/v2/lineage/{lineage_guid}?depth=10&direction=BOTH'

response = requests.get(url, headers=headers)

if response.status_code == 200:
lineage_data = response.json()
print("Lineage retrieved...")
print(lineage_data)
print(json.dumps(lineage_data, indent=4))
else:
print(f"Error retrieving lineage: {response.status_code}")
print(response.text)
return`

However, the response I get is as follows:

{ "baseEntityGuid": "b9205209-...", "lineageDirection": "BOTH", "lineageDepth": 10, "lineageWidth": 10, "childrenCount": -1, "guidEntityMap": {}, "includeParent": false, "relations": [], "parentRelations": [], "widthCounts": { "OUTPUT": {}, "INPUT": {} } }

For me, this seems like there might be a permissions issue or a misconfiguration in the lineage options. When I check within Purview, I can see the lineage properly configured:

image

The service principal being used for this purpose is capable of retrieving any information from the glossary. This is the main reason why I think permissions for my service principal are properly set.

Could anyone provide insights on what might be wrong or suggest additional configurations I need to check?

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    purview questionA question more about Purview and less about PyApacheAtlas

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions