Databricks Data Engineer Associate Question 206
Single answerYou are a data engineer working on a Databricks SQL project. Your team has created a SQL User-Defined Function (UDF) to standardize customer phone numbers. The team wants to share the UDF with another team securely while ensuring that only authorized users can access it. Which of the following statements about the security model for sharing SQL UDFs in Databricks is correct?
- A
SQL UDFs can only be accessed by users who have usage permissions on the database where the UDF is created.
- B
SQL UDFs can be shared with all users in the Databricks workspace by default, without requiring specific permissions.
- C
SQL UDFs can only be executed by users who have both usage permissions on the database and execute permissions on the UDF itself.
- D
SQL UDFs are automatically secured and do not require any additional permissions to be shared.
Show answer and explanation
Correct answer: C
Explanation
In Databricks, SQL UDFs are governed by a security model that requires users to have specific permissions to access and execute them. To execute a SQL UDF, a user must have usage permissions on the database in which the UDF resides and execute permissions on the UDF itself. This ensures that UDFs are securely shared only with authorized users.
- A. Incorrect.
This option is incorrect because usage permission on the database alone is not sufficient to execute a SQL UDF. Execute permissions on the UDF are also required.
- B. Incorrect.
This option is incorrect because sharing SQL UDFs requires explicit permissions, and they are not accessible to all users by default.
- C. Correct.
This option is correct because, in Databricks, both usage permissions on the database and execute permissions on the specific UDF are required to securely share and execute the UDF.
- D. Incorrect.
This option is incorrect because SQL UDFs require explicit permissions to ensure secure access and are not automatically shared or secured.