Forum Discussion

mwferris's avatar
mwferris
Copper Contributor
Feb 14, 2023

Purview API: When can a DataSet have many attachedSchema?

In the definition of a DataSet, there is a relationshipDef for attachedSchema that supports more than one schema. In what scenario would there be more than one attached schema for a single data set?

 

I am trying to extract the schema for an azure_datalake_gen2_resource_set based on a delta table. I have been just using the first attachedSchema in the returned list, but am wondering if that is safe to do.

 

Definition of the relationship:

 

{
"name": "attachedSchema",
"typeName": "array<schema>",
"isOptional": true,
"cardinality": "SET",
"valuesMinCount": -1,
"valuesMaxCount": -1,
"isUnique": false,
"isIndexable": false,
"includeInNotification": false,
"relationshipTypeName": "dataset_attached_schemas",
"isLegacyAttribute": false
}`

 

 

 

Example of what is returned from the purview API (when could there be more than one entry in the "attachedSchema" list?):

 

{
    "entity": {
        "typeName": "azure_datalake_gen2_resource_set",
        "relationshipAttributes": {
            "attachedSchema": [
                {
                    "guid": "guid",
                    "typeName": "parquet_schema",
                    "entityStatus": "ACTIVE",
                    "displayText": "parquet_schema",
                    "relationshipType": "dataset_attached_schemas",
                    "relationshipGuid": "relid",
                    "relationshipStatus": "ACTIVE",
                    "relationshipAttributes": {
                        "typeName": "dataset_attached_schemas"
                    }
                }
            ]
        }
    }
}

 

  

No RepliesBe the first to reply

Resources