Exam SnowPro Advanced Data Engineer All QuestionsBrowse all questions from this exam
Question 41

A Data Engineer has written a stored procedure that will run with caller's rights. The Engineer has granted ROLEA the right to use this stored procedure.

What is a characteristic of the stored procedure being called using ROLEA?

    Correct Answer: B

    A stored procedure that runs with caller's rights means it executes with the permissions of the role that invoked it. Therefore, if the stored procedure accesses an object that the caller’s role (ROLEA) does not have permission to access, the stored procedure will fail. This ensures that all actions performed by the stored procedure adhere to the permissions of the caller and prevents unauthorized access.

Discussion
stopthisnowOption: B

A caller’s rights stored procedure runs with the database privileges of the role that called the stored procedure. Any statement that the caller could not execute outside the stored procedure cannot be executed inside the stored procedure, either. For example, if the role named “Nurse” does not have privileges to delete rows from the medical_records table, then if a user with the role “Nurse” calls a caller’s rights stored procedure that tries to delete rows from that table, the stored procedure will fail. https://docs.snowflake.com/en/developer-guide/stored-procedure/stored-procedures-rights#caller-s-rights-stored-procedures