There are two databases in an account, named fin_db and hr_db which contain payroll and employee data, respectively. Accountants and Analysts in the company require different permissions on the objects in these databases to perform their jobs. Accountants need read-write access to fin_db but only require read-only access to hr_db because the database is maintained by human resources personnel. An Architect needs to create a read-only role for certain employees working in the human resources department. Which permission sets must be granted to this role?
Correct Answer: A
* To create a read-only role for certain employees working in the human resources department, the role needs to have the following permissions on the hr_db database: * USAGE on the database: This allows the role to access the database and see its schemas and objects. * USAGE on all schemas in the database: This allows the role to access the schemas and see their objects. * SELECT on all tables in the database: This allows the role to query the data in the tables. * Option A is the correct answer because it grants the minimum permissions required for a read-only role on the hr_db database. * Option B is incorrect because SELECT on schemas is not a valid permission. Schemas only support USAGE and CREATE permissions. * Option C is incorrect because MODIFY on the database is not a valid permission. Databases only support USAGE, CREATE, MONITOR, and OWNERSHIP permissions. Moreover, USAGE on tables is not sufficient for querying the data. Tables support SELECT, INSERT, UPDATE, DELETE, TRUNCATE, REFERENCES, and OWNERSHIP permissions. * Option D is incorrect because REFERENCES on tables is not relevant for querying the data. REFERENCES permission allows the role to create foreign key constraints on the tables. https://docs.snowflake.com/en/user-guide/security-access-control-privileges.html#database-privileges https://docs.snowflake.com/en/user-guide/security-access-control-privileges.html#schema-privileges https://docs.snowflake.com/en/user-guide/security-access-control-privileges.html#table-privileges
ARA-C01 Exam Question 52
A retail company has over 3000 stores all using the same Point of Sale (POS) system. The company wants to deliver near real-time sales results to category managers. The stores operate in a variety of time zones and exhibit a dynamic range of transactions each minute, with some stores having higher sales volumes than others. Sales results are provided in a uniform fashion using data engineered fields that will be calculated in a complex data pipeline. Calculations include exceptions, aggregations, and scoring using external functions interfaced to scoring algorithms. The source data for aggregations has over 100M rows. Every minute, the POS sends all sales transactions files to a cloud storage location with a naming convention that includes store numbers and timestamps to identify the set of transactions contained in the files. The files are typically less than 10MB in size. How can the near real-time results be provided to the category managers? (Select TWO).
Correct Answer: B,C
To provide near real-time sales results to category managers, the Architect can use the following steps: * Create an external stage that references the cloud storage location where the POS sends the sales transactions files. The external stage should use the file format and encryption settings that match the source files2 * Create a Snowpipe that loads the files from the external stage into a target table in Snowflake. The Snowpipe should be configured with AUTO_INGEST = true, which means that it will automatically detect and ingest new files as they arrive in the external stage. The Snowpipe should also use a copy * option to purge the files from the external stage after loading, to avoid duplicate ingestion3 * Create a stream on the target table that captures the INSERTS made by the Snowpipe. The stream should include the metadata columns that provide information about the file name, path, size, and last modified time. The stream should also have a retention period that matches the real-time analytics needs4 * Create a task that runs a query on the stream to process the near real-time data. The query should use the stream metadata to extract the store number and timestamps from the file name and path, and perform the calculations for exceptions, aggregations, and scoring using external functions. The query should also output the results to another table or view that can be accessed by the category managers. The task should be scheduled to run at a frequency that matches the real-time analytics needs, such as every minute or every 5 minutes. The other options are not optimal or feasible for providing near real-time results: * All files should be concatenated before ingestion into Snowflake to avoid micro-ingestion. This option is not recommended because it would introduce additional latency and complexity in the data pipeline. Concatenating files would require an external process or service that monitors the cloud storage location and performs the file merging operation. This would delay the ingestion of new files into Snowflake and increase the risk of data loss or corruption. Moreover, concatenating files would not avoid micro-ingestion, as Snowpipe would still ingest each concatenated file as a separate load. * An external scheduler should examine the contents of the cloud storage location and issue SnowSQL commands to process the data at a frequency that matches the real-time analytics needs. This option is not necessary because Snowpipe can automatically ingest new files from the external stage without requiring an external trigger or scheduler. Using an external scheduler would add more overhead and dependency to the data pipeline, and it would not guarantee near real-time ingestion, as it would depend on the polling interval and the availability of the external scheduler. * The copy into command with a task scheduled to run every second should be used to achieve the near-real time requirement. This option is not feasible because tasks cannot be scheduled to run every second in Snowflake. The minimum interval for tasks is one minute, and even that is not guaranteed, as tasks are subject to scheduling delays and concurrency limits. Moreover, using the copy into command with a task would not leverage the benefits of Snowpipe, such as automatic file detection, load balancing, and micro-partition optimization. References: * 1: SnowPro Advanced: Architect | Study Guide * 2: Snowflake Documentation | Creating Stages * 3: Snowflake Documentation | Loading Data Using Snowpipe * 4: Snowflake Documentation | Using Streams and Tasks for ELT * : Snowflake Documentation | Creating Tasks * : Snowflake Documentation | Best Practices for Loading Data * : Snowflake Documentation | Using the Snowpipe REST API * : Snowflake Documentation | Scheduling Tasks * : SnowPro Advanced: Architect | Study Guide * : Creating Stages * : Loading Data Using Snowpipe * : Using Streams and Tasks for ELT * : [Creating Tasks] * : [Best Practices for Loading Data] * : [Using the Snowpipe REST API] * : [Scheduling Tasks]
ARA-C01 Exam Question 53
A new user user_01 is created within Snowflake. The following two commands are executed: Command 1-> show grants to user user_01; Command 2 ~> show grants on user user 01; What inferences can be made about these commands?
Correct Answer: D
The SHOW GRANTS command in Snowflake can be used to list all the access control privileges that have been explicitly granted to roles, users, and shares. The syntax and the output of the command vary depending on the object type and the grantee type specified in the command1. In this question, the two commands have the following meanings: Command 1: show grants to user user_01; This command lists all the roles granted to the user user_01. The output includes the role name, the grantee name, and the granted by role name for each grant. This command is equivalent to show grants to user current_user if user_01 is the current user1. Command 2: show grants on user user_01; This command lists all the privileges that have been granted on the user object user_01. The output includes the privilege name, the grantee name, and the granted by role name for each grant. This command shows which role owns the user object user_01, as the owner role has the privilege to modify or drop the user object2. Therefore, the correct inference is that command 1 defines all the grants which are given to user_01, and command 2 defines which role owns user_01. Reference: SHOW GRANTS Understanding Access Control in Snowflake
ARA-C01 Exam Question 54
What is a key consideration when setting up search optimization service for a table?
Correct Answer: D
ARA-C01 Exam Question 55
An Architect is integrating an application that needs to read and write data to Snowflake without installing any additional software on the application server. How can this requirement be met?