Snowflake SnowPro Core (COF-C03) · 15% practice allocation

Snowflake COF-C03: Data loading, unloading, and transformation Practice Questions

5 free sample questions from the Data loading, unloading, and transformation domain, with answers and explanations. The full COF-C03 bank has 354 questions across 7 domains. Questions are scenario-based and written from the official Snowflake exam guide.

1.

An analyst needs to query a historical snapshot of a table named INVENTORY exactly as it existed at transaction ID 8675309. Which SQL syntax is correct?

  • A. SELECT * FROM INVENTORY AT (STATEMENT => '8675309') BEFORE CURRENT;
  • B. SELECT * FROM INVENTORY AT (STATEMENT => '8675309');
  • C. SELECT * FROM INVENTORY AT (VERSION => 8675309);✓ Correct
  • D. SELECT * FROM INVENTORY BEFORE (TRANSACTION => 8675309);
Explanation

Time Travel using a specific transaction ID uses the VERSION keyword: AT (VERSION => <integer>). This retrieves the table state as of that specific transaction. STATEMENT => accepts a query ID (string UUID), not a transaction integer ID—it returns the table state just after that statement executed, not at a transaction boundary. BEFORE (TRANSACTION => ...) is not valid Snowflake Time Travel syntax. AT (...) BEFORE CURRENT is not valid syntax at all. VERSION => is the correct parameter for transaction-based Time Travel.

2.

A data engineer needs to query a VARIANT column named EVENT_DATA that stores JSON objects like the following:

{"user": {"id": 1042, "region": "us-west"}, "action": "login"}

Which two of the following expressions correctly retrieve the value of the "region" field? (Select TWO.)

  • A. EVENT_DATA.user.region
  • B. EVENT_DATA->user->region
  • C. EVENT_DATA:user:region✓ Correct
  • D. GET(EVENT_DATA, 'user.region')
  • E. EVENT_DATA['user']['region']✓ Correct
Explanation

Snowflake supports two notations for traversing VARIANT JSON: bracket notation (EVENT_DATA['user']['region']) and colon notation (EVENT_DATA:user:region). Both are valid and return the same result. The arrow operator (->) is not valid Snowflake SQL syntax for VARIANT traversal. GET(col, 'user.region') attempts a single-level key lookup for the literal string 'user.region', which would return NULL because the key is not at the top level. Dot notation (EVENT_DATA.user.region) is only valid in Snowpark DataFrame APIs, not in SQL queries.

3.

A developer creates the following JavaScript stored procedure:

CREATE OR REPLACE PROCEDURE COUNT_ACTIVE_USERS() RETURNS FLOAT LANGUAGE JAVASCRIPT AS $$ var result = snowflake.execute({sqlText: 'SELECT COUNT(*) FROM USERS WHERE STATUS = 'active''}); result.next(); return result.getColumnValue(1); $$;

The procedure compiles without error but returns an unexpected value. What is the most likely issue?

  • A. The RETURNS type is FLOAT but COUNT(*) returns an INTEGER, causing an implicit cast that may be unexpected; however, the result will still be numerically correct.
  • B. JavaScript stored procedures cannot execute SELECT statements; only DML is allowed.
  • C. The procedure must be called with CALL COUNT_ACTIVE_USERS() but the parentheses are optional and may have been omitted.
  • D. snowflake.execute() is not a valid method; the correct method is snowflake.createStatement().execute().✓ Correct
Explanation

In Snowflake JavaScript stored procedures, the correct API pattern is snowflake.createStatement({sqlText: '...'}).execute(), not snowflake.execute(). The snowflake.execute() method does not exist and would throw a runtime error. JavaScript stored procedures can absolutely execute SELECT statements. FLOAT vs INTEGER return type is handled by implicit casting and is not the source of a wrong value in this context. The calling convention (CALL with parentheses) is required but does not affect the return value from inside the procedure.

4.

A developer needs to extract all individual product entries from a VARIANT column named ORDER_DOC that contains JSON arrays like the following:

{"order_id": 99, "products": [{"sku": "A1"}, {"sku": "B2"}]}

Which SQL function should be used to produce one row per product element?

  • A. FLATTEN✓ Correct
  • B. LATERAL JOIN with UNPIVOT
  • C. SPLIT_TO_TABLE
  • D. PARSE_JSON
Explanation

FLATTEN is the correct function. It is a Snowflake table function that explodes a VARIANT array or object into individual rows, making it ideal for expanding nested arrays inside VARIANT columns. PARSE_JSON converts a string to VARIANT but does not expand arrays into rows. LATERAL JOIN with UNPIVOT pivots columnar data but cannot expand VARIANT arrays in the same way. SPLIT_TO_TABLE splits a delimited string into rows and only works with VARCHAR, not VARIANT arrays.

5.

A machine learning team wants to create a Python UDF in Snowflake that uses the scikit-learn library. Which approach correctly makes scikit-learn available to the UDF at runtime?

  • A. Upload the entire scikit-learn wheel to a stage and reference it with HANDLER pointing to the wheel file.
  • B. Python UDFs in Snowflake do not support third-party packages; the code must be rewritten using built-in Python libraries only.
  • C. Include PACKAGES = ('scikit-learn') in the UDF definition so Snowflake pulls the package from the Snowflake Anaconda channel.✓ Correct
  • D. Add IMPORTS = ('@my_stage/sklearn.py') to the UDF definition to import the library file.
Explanation

Snowflake hosts a curated mirror of the Anaconda package repository. Python UDFs and stored procedures can declare third-party dependencies using the PACKAGES clause, and Snowflake makes those packages available at runtime. scikit-learn is available in this channel. IMPORTS is used to bring in custom Python files or local modules staged by the user, not managed Anaconda packages. You cannot reference a wheel file directly via HANDLER; HANDLER points to the Python function within your code. Python UDFs fully support third-party packages through the Anaconda channel.

Test yourself across every COF-C03 domain

The free COF-C03 practice test mixes about 20 questions weighted like the exam. The full 354-question bank adds instant grading, flashcards and a timed mock exam.

Study this domain

Data loading, unloading, and transformation study guide (COF-C03) →

Other COF-C03 domains

← All Snowflake SnowPro Core study resources