SnowPro Advanced: Data Engineer — Question 67
Which command will retrieve results for all objects of a row access policy db1.policies.objectslist at the database level?
Answer options
- A. SELECT * FROM TABLE( db1.ACCOUNT_USAGE.POLICY_REFERENCES( POLICY_NAME=>'db1.policies.objectslist' ) );
- B. SELECT * FROM TABLE( db1.INFORMATION_SCHEMA.POLICY_REFERENCES( POLICY_NAME=>'db1.policies.objectslist' ) );
- C. SELECT * FROM TABLE( db1.ACCOUNT_USAGE.ROW_ACCESS_POLICIES( POLICY_NAME=>'db1.policies.objectslist' ) );
- D. SELECT * FROM TABLE( db1.INFORMATION_SCHEMA.POLICY_REFERENCES( REF_ENTITY_NAME => 'db1.policies.objectslist', REF_ENTITY_DOMAIN => 'policy' ) );
Correct answer: B
Explanation
The correct answer is B because it utilizes the INFORMATION_SCHEMA to retrieve policy references specifically for the row access policy in question. Options A and C are incorrect as they reference ACCOUNT_USAGE, which is not intended for this purpose, while option D uses an incorrect reference entity format not applicable for retrieving all objects related to the policy.