SnowPro Core · 20% of the exam

Data transformations: free practice questions

5 sample questions from our 50-question bank for this domain — answers and explanations included. These are the same scenario-based style as the real Snowflake exam.

1. A developer creates a zero-copy clone of a production database: CREATE DATABASE PROD_CLONE CLONE PROD; A week later, a large number of rows are inserted into a table in PROD. Which statement BEST describes the storage impact of this clone one week after its creation?

  • A. The clone shares micro-partitions with PROD for data that existed at clone time; the new inserts in PROD create new micro-partitions that belong exclusively to PROD and are not shared with the clone.✓ Correct
  • B. The clone immediately duplicates all storage from PROD at the time of creation, so PROD's new inserts have no effect on the clone's storage cost.
  • C. The clone and PROD share all micro-partitions permanently, so new inserts to PROD are automatically visible in the clone.
  • D. Cloning a database is not supported in Snowflake; only individual tables and schemas can be cloned.
Explanation

Option A is correct. Zero-copy cloning works by sharing the existing micro-partitions between the source and clone — no data is physically copied at clone creation time. When new data is inserted into PROD after the clone is created, those inserts produce new micro-partitions that belong exclusively to PROD. The clone retains a reference to the original shared partitions and its storage cost only grows when data within the clone itself is modified (copy-on-write). Option B is incorrect because zero-copy cloning does NOT duplicate storage at creation time; that is the fundamental value proposition. Option C is incorrect because clones are independent objects — changes made to PROD after cloning are not visible in the clone, and vice versa (with the exception of shared unchanged partitions). Option D is incorrect because Snowflake supports zero-copy cloning at the table, schema, and database levels.

2. A Snowflake stored procedure is created with EXECUTE AS CALLER. A business user with restricted privileges calls this procedure. Which statement accurately describes the behavior?

  • A. The procedure executes with the privileges of the calling user; if the caller lacks SELECT on a referenced table, the procedure will fail.✓ Correct
  • B. EXECUTE AS CALLER means the procedure runs with the privileges of the procedure owner, ignoring the caller's role.
  • C. EXECUTE AS CALLER allows the procedure to bypass row-level security policies that apply to the calling user's role.
  • D. The procedure automatically elevates the caller's session role to SYSADMIN for the duration of execution.
Explanation

Option A is correct. When a stored procedure is defined with EXECUTE AS CALLER, it runs within the security context of the calling user. All privilege checks — including SELECT, INSERT, and other object-level permissions — are evaluated against the caller's active role. If the caller lacks the required privileges on any referenced object, the procedure will raise an error. Option B is incorrect because it describes EXECUTE AS OWNER behavior, where the procedure runs with the owner's privileges regardless of who calls it. Option C is the opposite of the truth; EXECUTE AS CALLER means standard privilege checks apply to the caller, so row-level security and access controls enforced by the caller's role are fully in effect. Option D is incorrect because stored procedures never automatically elevate a session role to SYSADMIN or any other role; role elevation requires explicit USE ROLE within the procedure body, which would be governed by role hierarchy rules.

3. A developer has a table column named RAW_DATA of type VARIANT that stores JSON payloads. Each payload contains a top-level key 'order' with a nested key 'total_amount'. Which of the following queries correctly retrieves the numeric value of 'total_amount' for all rows?

  • A. SELECT RAW_DATA['order']['total_amount']::FLOAT FROM orders;
  • B. SELECT RAW_DATA:order.total_amount::FLOAT FROM orders;✓ Correct
  • C. SELECT PARSE_JSON(RAW_DATA):order:total_amount::FLOAT FROM orders;
  • D. SELECT FLATTEN(RAW_DATA, 'order.total_amount')::FLOAT FROM orders;
Explanation

Option B is correct. Snowflake's colon (:) notation is used to traverse VARIANT paths, and dot notation can be chained for nested keys, making RAW_DATA:order.total_amount the idiomatic way to access nested JSON. Casting with ::FLOAT extracts a usable numeric value. Option A uses bracket notation which is valid for accessing array elements or keys with special characters, but chaining brackets like ['order']['total_amount'] on a VARIANT is not standard Snowflake SQL — the colon notation is required to start a path traversal. Option C would be correct if RAW_DATA were a STRING (requiring PARSE_JSON first), but since the column is already VARIANT, wrapping it in PARSE_JSON is redundant and actually causes an error. Option D is incorrect because FLATTEN is a table function used to explode arrays into rows; it does not accept dot-path strings to extract scalar values.

4. A data engineer wants to create a task that runs every 10 minutes and processes rows from a stream named SALES_STREAM. The engineer writes: CREATE OR REPLACE TASK PROCESS_SALES WAREHOUSE = COMPUTE_WH SCHEDULE = '10 MINUTE' AS INSERT INTO SALES_AGG SELECT ... FROM SALES_STREAM WHERE ... After creation, the task never executes. What is the MOST LIKELY reason?

  • A. The task was created in a suspended state and must be resumed with ALTER TASK PROCESS_SALES RESUME.✓ Correct
  • B. A standalone task cannot reference a stream; only serverless tasks can use streams as triggers.
  • C. The SCHEDULE parameter requires a CRON expression; '10 MINUTE' is not a valid interval format.
  • D. The task cannot use a virtual warehouse; it must use the SERVERLESS compute type to process streams.
Explanation

Option A is correct. In Snowflake, all newly created tasks start in a SUSPENDED state by default. The engineer must explicitly run ALTER TASK PROCESS_SALES RESUME before the task will execute on its schedule. This is one of the most common operational mistakes with Snowflake tasks. Option B is incorrect because both warehouse-based and serverless tasks can reference streams; streams can be used as a trigger condition (via WHEN SYSTEM$STREAM_HAS_DATA()) or simply queried within any task. Option C is incorrect because '10 MINUTE' (or '10 MINUTES') is a valid interval syntax for the SCHEDULE parameter alongside CRON expressions. Option D is incorrect because virtual warehouse tasks and serverless tasks are both valid compute options for tasks that process streams; the choice affects cost model and auto-scaling, not the ability to reference streams.

5. A developer is writing a Python (Snowpark) stored procedure and needs to use the third-party 'pandas' library within the procedure body. Which approach is required to make this library available?

  • A. Specify PACKAGES = ('pandas') in the CREATE PROCEDURE statement to import pandas from the Snowflake Anaconda channel.✓ Correct
  • B. Upload the pandas wheel file to a Snowflake internal stage and reference it with IMPORTS = ('@my_stage/pandas.whl').
  • C. Install pandas on the virtual warehouse nodes using a pip install shell command inside the procedure body.
  • D. Pandas cannot be used in Snowpark stored procedures because only pure-Python standard library modules are supported.
Explanation

Option A is correct. Snowflake hosts a curated Anaconda package repository, and third-party libraries like pandas are made available to Snowpark stored procedures (and UDFs) by listing them in the PACKAGES clause of the CREATE PROCEDURE statement. Snowflake handles the dependency installation in the sandbox environment automatically. Option B is incorrect for pandas specifically — uploading a wheel file via IMPORTS is used for custom or private Python packages not available in the Anaconda channel. Pandas is available in the channel and does not need to be manually staged. Option C is incorrect because stored procedures run in a managed Snowflake sandbox environment; there is no shell access to run pip install commands inside the procedure body. Option D is incorrect because Snowpark Python stored procedures explicitly support a wide range of third-party libraries (hundreds of packages) through the Snowflake Anaconda integration.

45 more questions in this domain

Practice the full bank with instant grading, flashcards, and a timed mock exam.

Start practicing free