cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Administration & Architecture
Explore discussions on Databricks administration, deployment strategies, and architectural best practices. Connect with administrators and architects to optimize your Databricks environment for performance, scalability, and security.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Issues with Delta Sharing API when using Service Principal Token

Useit
New Contributor

Hello,

I am currently working with the Delta Sharing API and have encountered an issue when using a Service Principal token for authentication. The API call returns the following error:

[CANNOT_INFER_EMPTY_SCHEMA] Can not infer schema from empty dataset.

However, when I use a personal access token, the API works as expected.

My questions are:
1. Does the Delta Sharing API only support personal access tokens for authentication?
2. Is there any additional configuration or permission required when using a Service Principal token for Delta Sharing?
3. Has anyone else encountered this schema inference error, and how can it be resolved?

Thanks

1 REPLY 1

Mounika_Tarigop
Databricks Employee
Databricks Employee

Please find the response below: 

1) The Delta Sharing API supports both personal access tokens and service principal tokens for authentication.

2) Service principals need to be granted specific roles and permissions to access data. This includes assigning the service principal to appropriate groups and roles at both the account and workspace levels. Service principals must be explicitly granted access to data. This can be done at the account level using Unity Catalog or at the workspace level

3) The error [CANNOT_INFER_EMPTY_SCHEMA] Can not infer schema from empty dataset suggests that the dataset being accessed is empty or the service principal does not have the necessary permissions to read the data. To resolve this:

  • Ensure that the service principal has the correct permissions to access the dataset.
  • Check if the service principal is correctly configured in the Unity catalog or the data governance framework.

https://docs.databricks.com/en/admin/users-groups/service-principals.html

 

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you wonโ€™t want to miss the chance to attend and share knowledge.

If there isnโ€™t a group near you, start one and help create a community that brings people together.

Request a New Group