Spark Catalog Whitelisted for Shared Clusters & Table Access Control

Lin, Kevin 20 Reputation points
2023-06-05T18:07:13.7633333+00:00

I have recently enabled Unity Catalog for my cluster that is on 13.0 Runtime Version, and was trying to create a database that required a spark dataframe. However, whenever it reached the spark parameter it would then try to perform a rdd() function on it causing this error to appear:

py4j.security.Py4JSecurityException: Method public org.apache.spark.rdd.RDD org.apache.spark.api.java.JavaRDD.rdd() is not whitelisted on class class org.apache.spark.api.java.JavaRDD

I've looked into this issues, and many discussion posts stated that I could overcome this error by adding this line in the spark config:
spark.databricks.pyspark.enablePy4JSecurity false

I tried that and this is the error I got:

User's image

Therefore, I've been trying to create a whitelist of classes that I want to specify in the spark config but am not sure on how to do so as I couldn't find any documentation on it. Would appreciate the help if anyone has figured this help.

Thank you

Azure Databricks
Azure Databricks
An Apache Spark-based analytics platform optimized for Azure.
1,916 questions
{count} votes