Valid NAS-C01 Dumps shared by ExamDiscuss.com for Helping Passing NAS-C01 Exam! ExamDiscuss.com now offer the newest NAS-C01 exam dumps, the ExamDiscuss.com NAS-C01 exam questions have been updated and answers have been corrected get the newest ExamDiscuss.com NAS-C01 dumps with Test Engine here:
You are designing a setup script for a Snowflake Native Application. This script needs to perform the following actions: 1. Create a secure view that exposes a subset of data from a table owned by the provider account. 2. Grant 'SELECT privilege on this secure view to a specific role within the consumer account, but ONLY if that role already exists in the consumer account. 3. Create a UDF in the provider account which calls external function. This UDF needs access to a secret stored in a Snowflake secret object. Which of the following code snippets BEST implements these requirements, ensuring both security and proper privilege management?
Correct Answer: B
Option B correctly implements all requirements. It uses a 'BEGIN...ENDS block with an statement to check for the existence of the 'consumer_role' before granting the privilege. This prevents errors if the role doesn't exist. Also it creates a UDF which utilizes Snowflake Secret object to fetch secretes. Using Javascript code inside UDF directly to fetch secrets is not allowed. Options A, C and D do not check for role existence and doesn't configure Snowflake secret object