@Ravineesh I have a sample script using native python/REST calls to bulk assign ownership. It might help: https://github.com/mrobson1975/purview-api-cookbook/blob/main/entity/entity-bulk-assign-owner.ipynb
How to update contact details in Purview through azure-purview-catalog python package
Ravineesh
80
Reputation points
I'm trying to update the contact details of the table using the azure-purview-catalog python package.
from azure.purview.catalog import PurviewCatalogClient
from azure.identity import DefaultAzureCredential
credential = DefaultAzureCredential()
client = PurviewCatalogClient(endpoint=f"https://{os.environ['PURVIEW_NAME']}.purview.azure.com", credential=credential
I'm trying to use the function: create_or_update(), as per the argument received by the function which is a JSON object, I'm passing the below data
{'entity': {'contacts': {'Expert': [{'id': 'xxxxxxxxxxxx', 'info': 'xxxxxxxxxx'}], 'Owner': [{'id': 'xxxxxxxxxxxxxxxxxx', 'info': 'xxxxxxxxxxxxxxxxx'}]}, 'guid': 'table_guid'}}
Below is the error I'm receiving while trying to update the contact details of the table.
client.entity.create_or_update(contact_data)
Error:
HttpResponseError: Operation returned an invalid status 'Bad Request' Content: {"requestId":"967ceef8-cc1b-11ee-bb2e-00163ee189fd","errorCode":"ATLAS-400-00-014","errorMessage":"Type ENTITY with name null does not exist"}
I'm not sure what is being done wrong here, I've formatted the JSON input as it is supposed to be expected by the function. Please let me know, how to fix this. I can't find any suitable example for this task.
Accepted answer
-
Michael Robson 75 Reputation points Microsoft Employee
2024-02-23T15:58:56.2333333+00:00