Hello @swapnil kamle ,
Thanks for the question and using MS Q&A platform.
You may checkout the below options:
Option1: Use the partial update entity endpoint: Entity - Partial Update Entity By Unique Attributes - REST API (Azure Purview) | Microsoft Learn
- Sample below using PyApacheAtlas: wjohnson/pyapacheatlas: A python package to help work with the apache atlas REST APIs (github.com)
- You would need to create a list of tuples that contain qualified name of the hive table and the description.
- Then iterate over that list and call the endpoint.
- This assumes they are all hive_table and that you know all of the qualified names.
Option2: You can use the bulk entity update endpoint: Entity - Create Or Update Entities - REST API (Azure Purview) | Microsoft Learn
- Has the benefit of a single REST endpoint call vs many.
- For some types (not hive_table it looks like) this endpoint requires that you ALSO know the required attributes (e.g. a data-type attribute).
- You still need to know the qualified names and the existing name of the table. This method will overwrite the name.
Option3: You can also use PyApacheAtlas’ excel functionality that works like #2 but with the convenience of doing this in Excel.
- See sample code here: pyapacheatlas/excel_bulk_entities_upload.py at master · wjohnson/pyapacheatlas (github.com)
- See this video overview: Azure Purview Bulk Asset Upload with Excel and PyApacheAtlasYouTube
- Ultimately, they would have a spreadsheet with a tab called BulkEntities and have something like the below table.
Sample Code for Option #1 using Partial Update Entities
from pyapacheatlas.core.client import PurviewClient
from azure.identity import AzureCliCredential
PURVIEW_NAME = "MY_PURVIEW_SERVICE_NAME"
cred = AzureCliCredential()
client = PurviewClient(
account_name=PURVIEW_NAME,
authentication=cred
)
list_of_qualified_names_and_descriptions = [("qn1", "desc1"), ("qn2", "desc2")]
for qualified_name, description in list_of_qualified_names_and_descriptions:
client.partial_update_entity(
typeName="hive_table",
qualifiedName=qualified_name,
attributes={
"description": description
}
)
Hope this will help. Please let us know if any further queries.
------------------------------
- Please don't forget to click on or upvote button whenever the information provided helps you. Original posters help the community find answers faster by identifying the correct answer. Here is how
- Want a reminder to come back and check responses? Here is how to subscribe to a notification
- If you are interested in joining the VM program and help shape the future of Q&A: Here is how you can be part of Q&A Volunteer Moderators