All collections in the Microsoft Purview data map have a friendly name and a name.
The friendly name is the one you see in the collection, for example, Operations.
The name for all collections (except the root collection) is a six-character name assigned by the data map.
Python needs this six-character name to reference any sub-collections. To convert your friendly name automatically to the six-character collection name needed in the API, use this little helper function:
def findRealCollectionName(admin_client, collection_name):
collection_list = admin_client.collections.list_collections()
for collection in collection_list:
if (collection["friendlyName"].lower() == collection_name.lower()):
return collection["name"]
The API am referring to is at: https://learn.microsoft.com/en-us/rest/api/purview/catalogdataplane/collection/create-or-update-bulk?tabs=HTTP
or the Python library azure-purview-catalog (the module name is azure.purview.catalog) using the client: PurviewCatalogClient which uses the API above.
The API am referring to is at: https://learn.microsoft.com/en-us/rest/api/purview/catalogdataplane/collection/create-or-update-bulk?tabs=HTTP
or the Python library azure-purview-catalog (the module name is azure.purview.catalog) using the client: PurviewCatalogClient which uses the API above.
https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/purview/azure-purview-catalog
https://learn.microsoft.com/en-us/rest/api/purview/catalogdataplane/collection/create-or-update-bulk?tabs=HTTP
Sign in to comment