Register Excel file in Azure Data Catalog using REST API

Sam4749 1 Reputation point
2021-11-15T07:41:19.187+00:00

Hi,

I am trying to register Excel files using Azure Data Catalog REST API. I see that Excel is not a supported Data Source type. So I am using File System/File as the Data Source Type/Object Type. Below is the test JSON.

{
  "roles": [
    {
      "role": "Owner",
      "members": [
        {
          "objectId": "<object id of user from AAD>"
        }
      ]
    }
  ],
  "properties": {
    "name": "ADC-Test-Xlsx",
    "dsl": {
      "address": {
        "path": "<path to the file>"
      },
      "protocol": "file",
      "authentication": "none"
    },
    "dataSource": {
      "sourceType": "File System",
      "objectType": "File"
    },
    "lastRegisteredBy": {
      "upn": "<upn from AAD>",
      "firstName": "John",
      "lastName": "Doe"
    },
    "fromSourceSystem": false

  },
  "annotations": {
    "schema": {
      "properties": {
        "fromSourceSystem": false,
        "columns": [
          {
            "name": "Col1",
            "type": "text"
          },
          {
            "name": "Col2",
            "type": "text"
          }
        ]
      }   
    }       
  }
}

The asset gets registered successfully, but the columns are non-editable. I added

 "roles": [
                            {
                                "role": "Contributor",
                                "members": [
                                    {
                                        "objectId": "00000000-0000-0000-0000-000000000201"
                                    }
                                ]
                            }
                        ]

in the schema to make the columns editable, but I am getting a 'Forbidden' error. Honestly, I am not even sure if this is the correct way of registering Excel files. Can anyone kindly direct me to the correct way to registering Excel files with columns using REST API?

Thanks in advance
Shameer

Azure Data Catalog
Azure Data Catalog
An Azure service that serves as a system of registration and system of discovery for enterprise data assets.
103 questions
{count} votes

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.