In Purview,How to assign the glossary to the assets for bulk upload using script?

Dalvi, Satish 0 Reputation points
2024-06-07T07:49:33.1333333+00:00

Hi,

We have recently started using purview. One of the task we did is we defined our glossary and uploaded to the purview. Now we want to assign the glossary to the assets we have in purview.

I am facing the issue with the payload and mapping step.

Below is the standard code i am using.

az login

access_token=$(az account get-access-token --resource https://purview.azure.net --query accessToken --output tsv)

purview_account_name="
Microsoft Purview
Microsoft Purview
A Microsoft data governance service that helps manage and govern on-premises, multicloud, and software-as-a-service data. Previously known as Azure Purview.
1,224 questions
{count} votes

2 answers

Sort by: Most helpful
  1. PRADEEPCHEEKATLA 90,226 Reputation points
    2024-06-07T10:08:46.42+00:00

    @Dalvi, Satish - Thanks for the question and using MS Q&A platform.

    To assign a glossary to assets in bulk using a script, you need to make sure that you have the correct asset_guid and glossary_term_guid. The asset_guid is the unique identifier for the asset in Purview, and the glossary_term_guid is the unique identifier for the glossary term that you want to assign to the asset.

    Based on the code you provided, it seems that you are using the correct API endpoint to assign the glossary term to the asset. However, the error message you received indicates that there was an issue processing your request. This could be due to a transient issue, so you may want to try running the operation again.

    Make sure that you have the necessary permissions to assign glossary terms to assets in Purview. You can check your permissions by going to the Purview account settings and reviewing the access policies.

    If the issue persists, you may open a support ticket with the requestId and errorCode provided in the error message for further assistance.

    Hope this helps. Do let us know if you any further queries.

    0 comments No comments

  2. PRADEEPCHEEKATLA 90,226 Reputation points
    2024-07-08T02:10:49.5133333+00:00

    @Dalvi, Satish I'm glad that you were able to resolve your issue with the help of support ticket and thank you for posting your solution so that others experiencing the same thing can easily reference this! Since the Microsoft Q&A community has a policy that "The question author cannot accept their own answer. They can only accept answers by others ", I'll repost your solution in case you'd like to accept the answer .

    Issue: Issue with assigning a glossary to assets in Purview using a script. 

    Cause: The payload script and the payload name were not correct.  

    Resolution: After correcting the script and the payload name issue get resolved.

    If I missed anything please let me know and I'd be happy to add it to my answer, or feel free to comment below with any additional information.

    If you have any other questions, please let me know. Thank you again for your time and patience throughout this issue.


    Please don’t forget to Accept Answer and Yes for "was this answer helpful" wherever the information provided helps you, this can be beneficial to other community members.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.