can not set table access permission using cluster

arkiboys 9,706 Reputation points
2024-03-18T11:16:32.6233333+00:00

In databricks database table I was able to set permissions to groups but Now I get this error when using a cluster:

Error getting permissions

summary: SparkException: Trying to perform permission action on Hive Metastore /CATALOG/hive_metastore/DATABASE/db_name/TABLE/tbl_name but Table Access Control is not enabled on this cluster., data: com.databricks.backend.common.rpc.SparkDriverExceptions$SQLExecutionException: org.apache.spark.SparkException:

 

Table access control is indeed enabled in the security tab when I am inside the Admin settings.

 

The cluster version I am using is:

policy --> unrestricted Access mode --> No Isolation shared worker type --> standard_D8_v3 driver type --> standard_D8_v3

Azure Databricks
Azure Databricks
An Apache Spark-based analytics platform optimized for Azure.
2,514 questions
0 comments No comments
{count} votes

Accepted answer
  1. Bhargava-MSFT 31,261 Reputation points Microsoft Employee Moderator
    2024-03-18T21:10:44.9766667+00:00

    Hello arkiboys,

    from the error message, It seems like table access is not enabled on the cluster or Azure Databricks workspace administrators doesn't have access to file-level data.

    Please confirm if you have acess at file-level? if you have access at file-level, then please check the following.

    Table access control is available in two versions:

    SQL-only table access control: set the following flag in the cluster’s Spark conf:

    spark.databricks.acl.sqlOnly true

    Python and SQL table access control

    set the Spark config spark.databricks.pyspark.iptable.outbound.whitelisted.ports to the ports you want to allow access.

    To enable table access control:
    from the documentation:

    Before users can configure Python and SQL table access control, an Azure Databricks workspace must enable table access control for the Azure Databricks workspace and deny users access to clusters that are not enabled for table access control.

    https://learn.microsoft.com/en-us/azure/databricks/data-governance/table-acls/table-acl#--enable-table-access-control-for-your-workspace

    Go to admin settings page:

    Workspace admin --> security--> click the table access control toggle and confirm

    User's image

    Once the table access control has been enabled on a cluster, see Data object privileges.

    I hope this helps.


0 additional answers

Sort by: Most helpful

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.