DEA-C02 Practice Exam — DEA-C02:Advanced Data Engineer

1. The question bank is cloud‑connected and updates automatically; no manual re‑acquisition is required.

2. Start practicing right after activating the question bank. It supports simultaneous use on websites and mini‑programs, with one‑click bilingual switching for each question.

3. Functions include online practice, mock tests, note‑taking, wrong‑question recording, etc., valid for one year.

4. Recommended practice order: Turn on review mode to browse questions → Complete sequential practice → Take mock exams for pre‑test self‑assessment.

5. Activation codes can be purchased by clicking Buy Now on the right or via our official Tmall flagship store.

6. For inquiries, contact customer service through mini‑program, WeChat, WhatsApp or LINE.

Sample questions

DEA-C02 · Q1
Question #1 A Data Engineer is investigating a query that is taking a long time to return. The Query Profile shows the following: " target="_blank" rel="nofollow noopener">https://img.examtopics.com/snowpro-advanced-data-engineer/image1.png"> What step should the Engineer take to increase the query performance?
  • A.
    Add additional virtual warehouses.
  • B.
    Increase the size of the virtual warehouse.
  • C.
    Rewrite the query using Common Table Expressions (CTEs).
  • D.
    Change the order of the joins and start with smaller tables first.

Answer: B

The suggested answer B is correct because the scenario implies the query profile identifies a compute bottleneck, such as long-running parallelizable operations like large table scans, heavy aggregations, or join processing with no identified issues in query logic, data pruning, or join efficiency. Increasing the virtual warehouse size allocates more CPU cores and memory to the warehouse, which directly speeds up compute-bound workloads in Snowflake's parallel execution architecture. This is a core Snowflake performance tuning best practice for individual queries that are not limited by inefficient syntax or poor data design. Option Analysis: A. Incorrect. Adding additional virtual warehouses only improves concurrency for running multiple simultaneous queries. Individual queries in Snowflake execute on a single virtual warehouse at a time, so adding more warehouses has no impact on the runtime of a single slow query. This action addresses capacity for concurrent workloads, not individual query performance. B. Correct. Increasing the size of the virtual warehouse scales up the compute and memory resources available to the query. For compute-bound queries, which is the root cause implied by the query profile in this scenario, larger warehouses reduce processing time for parallelizable operations, leading to faster query completion. This aligns with Snowflake's elastic compute model where warehouse size scaling is the first recommended step for compute-bound single query performance issues. C. Incorrect. Rewriting queries with Common Table Expressions (CTEs) does not deliver inherent performance improvements in Snowflake. Snowflake's cost-based optimizer processes CTEs identically to equivalent subquery logic in nearly all cases, so this rewrite would not resolve an underlying compute resource bottleneck. There is no indication from the scenario that the query's syntax structure is the cause of poor performance. D. Incorrect. Snowflake's cost-based query optimizer automatically reorders joins to prioritize smaller tables and minimize intermediate result sizes, so manual adjustment of join order is almost never required to improve performance. This action would not address a compute resource bottleneck, which is the root cause of the slow query in this scenario. Key Concepts: 1. Virtual Warehouse Scaling Patterns: Snowflake supports two primary scaling patterns for warehouses: scaling up, which means resizing to a larger warehouse, to improve individual query performance for compute-bound workloads, and scaling out, which means adding warehouse clusters or separate warehouses, to support higher concurrency for multiple simultaneous queries. 2. Query Profile Diagnostics: The Snowflake Query Profile provides granular visibility into query execution steps, resource utilization, and bottlenecks, allowing data engineers to distinguish between compute-bound issues resolved by warehouse scaling and issues related to query logic, data pruning, or table design resolved by code or schema adjustments. 3. Cost-Based Optimizer Capabilities: Snowflake's built-in cost-based optimizer automatically optimizes query execution including join reordering, predicate pushdown, and CTE processing, eliminating the need for most manual query syntax adjustments to improve execution efficiency. References: Virtual Warehouse Sizes, Analyzing Queries Using Query Profile, https://docs.snowflake.com/en/user-guide/ui-query-profile
DEA-C02 · Q2
Question #2 How can the following relational data be transformed into semi-structured data using the LEAST amount of operational overhead? " target="_blank" rel="nofollow noopener">https://img.examtopics.com/snowpro-advanced-data-engineer/image2.png">
  • A.
    Use the TO_JSON function.
  • B.
    Use the PARSE_JSON function to produce a VARIANT value.
  • C.
    Use the OBJECT_CONSTRUCT function to return a Snowflake object.
  • D.
    Use the TO_VARIANT function to convert each of the relational columns to VARIANT.

Answer: C

The scenario requires converting relational row data (composed of multiple discrete structured columns) into a unified semi-structured format with the lowest possible operational overhead. Native Snowflake semi-structured data types (OBJECT, ARRAY, VARIANT) are optimized for this use case, and the ideal approach avoids unnecessary intermediate processing steps like string formatting or parsing. The OBJECT_CONSTRUCT function directly assembles a native semi-structured OBJECT from relational column inputs in a single pass, requiring minimal compute resources and no manual data manipulation, making it the lowest overhead solution aligned with Snowflake best practices for data engineering workloads. Option Analysis: A. Incorrect. The TO_JSON function returns a JSON-formatted VARCHAR string, not a native Snowflake semi-structured data type. Additionally, TO_JSON only accepts semi-structured inputs (VARIANT, OBJECT, ARRAY), so it cannot directly process relational columns, requiring an extra step to first assemble columns into a semi-structured object before calling TO_JSON, adding unnecessary operational overhead. B. Incorrect. The PARSE_JSON function converts a JSON-formatted VARCHAR string to a VARIANT value. To use this for relational data, you would first need to manually construct a valid JSON string from all relational columns, which requires handling string escaping, data type formatting, and correct JSON syntax. This adds significant operational overhead and introduces risk of conversion errors, making it a non-optimal choice. C. Correct. The OBJECT_CONSTRUCT function is explicitly designed to create a native Snowflake OBJECT (a semi-structured key-value data type compatible with VARIANT) directly from input key-value pairs. A single call to OBJECT_CONSTRUCT, passing each column name as a key and the corresponding column value as the value, converts an entire relational row to semi-structured data in one step with no intermediate processing, resulting in the least operational overhead. D. Incorrect. Converting each individual relational column to VARIANT using TO_VARIANT produces multiple separate VARIANT columns, rather than a single unified semi-structured representation of the relational row. This approach does not meet the core requirement of transforming the full relational dataset to semi-structured, and requires a separate function call per column, leading to higher overhead than a single OBJECT_CONSTRUCT call. Key Concepts: 1. Snowflake Native Semi-Structured Data Types: Snowflake supports three optimized semi-structured data types (VARIANT, OBJECT, ARRAY) that store hierarchical, schema-flexible data natively, avoiding the performance and maintenance costs of storing semi-structured data as raw strings. 2. OBJECT_CONSTRUCT Function Capabilities: This built-in SQL function dynamically generates a Snowflake OBJECT type from arbitrary key-value pairs, enabling direct one-step conversion of relational row data to semi-structured data without intermediate processing steps. 3. Semi-Structured Conversion Best Practices: Direct construction of native semi-structured types from source relational data eliminates costly string formatting and parsing operations, reducing compute overhead and lowering the risk of data corruption from invalid JSON syntax during conversion. References: Snowflake SQL Reference: OBJECT_CONSTRUCT Function, https://docs.snowflake.com/en/sql-reference/functions/object_construct Snowflake User Guide: Semi-Structured Data, https://docs.snowflake.com/en/user-guide/semistructured-intro
DEA-C02 · Q3
Question #3 A Data Engineer executes a complex query and wants to make use of Snowflake’s query results caching capabilities to reuse the results.Which conditions must be met? (Choose three.)
  • A.
    The results must be reused within 72 hours.
  • B.
    The query must be executed using the same virtual warehouse.
  • C.
    The USED_CACHED_RESULT parameter must be included in the query.
  • D.
    The table structure contributing to the query result cannot have changed.
  • E.
    The new query must have the same syntax as the previously executed query.
  • F.
    The micro-partitions cannot have changed due to changes to other data in the table.

Answer: DEF

This question evaluates core knowledge of Snowflake query result cache eligibility rules, a critical performance optimization topic for the SnowPro Advanced Data Engineer certification. The query result cache is a cloud services layer resource that stores fully computed results of successful queries to eliminate redundant compute for repeat identical queries. For a new query to reuse cached results, three non-negotiable conditions must be met: the query syntax must exactly match the original, the schema of all referenced tables must be unchanged, and the underlying micro-partitions of referenced tables must not have been modified. These conditions correspond directly to options D, E, and F, the correct answers for this question. Option Analysis: A. Incorrect. Snowflake retains query results for general automatic reuse for a default 24 hour window, not 72 hours. While results may be retained for up to 7 days for limited use cases such as RESULT_SCAN operations, standard automatic cache reuse is restricted to 24 hours, making this statement invalid. B. Incorrect. The query result cache is a global cloud services layer resource, independent of the virtual warehouse used to run the original query. Cached results can be accessed using any appropriately sized virtual warehouse with correct permissions, so using the same warehouse is not a requirement. C. Incorrect. The relevant session parameter is named USE_CACHED_RESULT, not USED_CACHED_RESULT, and this parameter is enabled by default at the account, session, and query levels. No explicit inclusion of the parameter in a query is required to leverage cached results. D. Correct. Any modification to the structure of tables referenced in the query, including adding or dropping columns, changing data types, or modifying constraints, invalidates the cached result set. Unchanged table structures are a mandatory condition for cache reuse. E. Correct. The new query must have exactly identical syntax to the original query to match the cached result, including matching capitalization, whitespace, and object reference formatting. Even minor differences in query text will prevent a cache match. F. Correct. Any change to the underlying micro-partitions of referenced tables, including inserts, updates, deletes, or reclustering operations, invalidates the cached result set because the source data used to generate the original result is no longer consistent. Unmodified micro-partitions for referenced tables are a required condition for cache reuse. Key Concepts: 1. Query Result Cache Architecture: The query result cache is hosted in Snowflake's cloud services layer, separate from compute and storage layers. It stores fully computed query results for 24 hours by default, is accessible across all virtual warehouses in an account, and eliminates the need to reprocess source data for identical repeat queries. 2. Cache Invalidation Rules: Cached results are automatically invalidated if referenced table schemas change, referenced table micro-partitions are modified, the query includes non-deterministic functions, the running user lacks permissions to access the original result, or the query syntax differs from the original executed query. 3. Cache Eligibility Requirements: For a query to reuse cached results, it must have identical syntax to a previously run query, reference unmodified table schemas and source data, exclude non-deterministic and external functions, and be executed by a user with permissions to access the original result set. References: Using the Query Result Cache, SnowPro Advanced: Data Engineer Exam Guide
DEA-C02 · Q4
Question #4 A Data Engineer needs to load JSON output from some software into Snowflake using Snowpipe.Which recommendations apply to this scenario? (Choose three.)
  • A.
    Load large files (1 GB or larger).
  • B.
    Ensure that data files are 100-250 MB (or larger) in size, compressed.
  • C.
    Load a single huge array containing multiple records into a single table row.
  • D.
    Verify each value of each unique element stores a single native data type (string or number).
  • E.
    Extract semi-structured data elements containing null values into relational columns before loading.
  • F.
    Create data files that are less than 100 MB and stage them in cloud storage at a sequence greater than once each minute.

Answer: BDE

This question evaluates knowledge of Snowpipe loading best practices and semi-structured JSON data handling requirements for Snowflake, core domains for the SnowPro Advanced Data Engineer certification. The three correct recommendations directly address performance, data integrity, and cost efficiency for continuous JSON ingestion via Snowpipe. They align with official Snowflake guidance for optimizing continuous loading workflows and semi-structured data storage, avoiding common anti-patterns that increase latency, reduce query performance, or cause unexpected data errors. Option Analysis: A. Incorrect. Loading 1 GB or larger files is not recommended for Snowpipe. Oversized files reduce parallel processing capacity, extend ingestion latency, and limit the continuous, near-real-time performance Snowpipe is designed to deliver for incremental loading workflows. B. Correct. Official Snowflake loading best practices specify compressed data files of 100-250 MB (or up to ~500 MB compressed) as optimal for Snowpipe. This size range balances parallel processing efficiency, reduces per-file metadata operation overhead, and avoids the latency associated with extremely small or extremely large files for continuous ingestion. C. Incorrect. Loading a single large array of multiple records into one table row is a documented anti-pattern. This forces repeated complex semi-structured parsing for every query, drastically reduces query performance, and prevents Snowflake from leveraging columnar storage optimizations for individual record fields. Best practice is to flatten nested arrays at load time to store each record as a separate row. D. Correct. Snowflake's variant data type preserves native data types for JSON elements, but mixed types for the same element key (e.g., a "user_id" field stored as a number in one record and a string in another) cause unexpected query results, type mismatch errors, and performance degradation. Verifying each unique element uses a single native data type ensures consistent data quality and optimal query performance. E. Correct. Extracting semi-structured elements (especially those with frequent null values) into typed relational columns during loading (via Snowpipe copy transformations) improves storage efficiency and query speed. Relational columns use Snowflake's optimized columnar storage, eliminating the need to parse the JSON variant object to retrieve values during queries, which is far more efficient than storing null values directly in variant fields. F. Incorrect. Staging files smaller than 100 MB more than once per minute creates excessive overhead for Snowpipe. Each staged file triggers metadata checks and loading events, so frequent small files lead to higher compute costs, increased ingestion latency, and underutilized Snowpipe warehouse resources, making this a well-documented anti-pattern for Snowpipe. Key Concepts: 1. Snowpipe File Size Optimization: Snowpipe is optimized for continuous incremental loading, so compressed file sizes of 100-250 MB balance parallel processing capacity, per-file overhead, and ingestion latency to minimize cost and maximize performance. 2. Semi-Structured JSON Data Best Practices: Consistent typing for JSON elements and extraction of frequently accessed or null-heavy fields to relational columns maximizes query performance and storage efficiency by leveraging Snowflake's columnar storage engine instead of repeated variant parsing operations. 3. Continuous Ingestion Anti-Patterns: Frequent ingestion of small files (<100 MB) or extremely large files (>1 GB) for Snowpipe increases cost and latency by creating unnecessary metadata operations or reducing parallel processing capacity. References: Preparing Your Data Files for Loading, https://docs.snowflake.com/en/user-guide/data-load-prepare Snowpipe Best Practices
DEA-C02 · Q5
Question #5 Given the table SALES which has a clustering key of column CLOSED_DATE, which table function will return the average clustering depth for the SALES_REPRESENTATIVE column for the North American region?
  • A.
    select system$clustering_information('Sales', 'sales_representative', 'region = ''North America''');
  • B.
    select system$clustering_depth('Sales', 'sales_representative', 'region = ''North America''');
  • C.
    select system$clustering_depth('Sales', 'sales_representative') where region = 'North America';
  • D.
    select system$clustering_information('Sales', 'sales_representative') where region = 'North America’;

Answer: B

The question requires returning the average clustering depth for the SALES_REPRESENTATIVE column filtered to only rows in the North American region. Core Snowflake clustering metadata function knowledge confirms that SYSTEM$CLUSTERING_DEPTH is the correct function to return average clustering depth, and filter predicates for subsetting the table during calculation are passed as a third string argument to the function, not as an outer WHERE clause. The correct syntax requires the table name as the first parameter, the target column as the second parameter, and the properly escaped predicate string as the third parameter, which matches the structure of option B. The existing clustering key on CLOSED_DATE is irrelevant here, as Snowflake supports calculating clustering depth for any column in a table regardless of the defined clustering key. Option Analysis: A. Incorrect. SYSTEM$CLUSTERING_INFORMATION returns a JSON object with comprehensive clustering metrics including partition overlap, total partitions, and average depth, rather than only the average clustering depth value requested. While the predicate syntax is correct, the function does not match the requirement. B. Correct. SYSTEM$CLUSTERING_DEPTH is the dedicated function to return average clustering depth for a specified column. The parameters are correctly structured: the first argument is the table name SALES, the second is the target column SALES_REPRESENTATIVE, the third is the properly escaped predicate string that filters to the North America region. This returns exactly the requested metric. C. Incorrect. The outer WHERE clause is invalid here because SYSTEM$CLUSTERING_DEPTH returns a single numeric depth value and does not include a REGION column in its output, so the filter cannot be applied externally. Filter predicates for clustering metrics must be passed as an argument to the function itself. D. Incorrect. This option has two critical errors: first, it uses SYSTEM$CLUSTERING_INFORMATION which does not return only the average depth value, and second, it uses an invalid outer WHERE clause that references a REGION column not present in the function's output. Key Concepts: 1. Clustering Metadata Function Differentiation: Snowflake provides two primary system functions for clustering metrics: SYSTEM$CLUSTERING_DEPTH returns a numeric value representing the average clustering depth for a specified column or set of columns, while SYSTEM$CLUSTERING_INFORMATION returns a JSON object with full clustering details including overlap, partition counts, and depth. 2. Clustering Function Predicate Syntax: When calculating clustering metrics for a subset of table data, filter conditions are passed as a third string argument to the clustering system functions, not as an outer WHERE clause, since the functions operate on table metadata rather than returning row-level data from the table. 3. Cross-Column Clustering Depth Calculation: Clustering depth can be calculated for any column(s) in a table, regardless of the table's defined clustering key, to assess how well sorted the table is by the target column(s) for query performance optimization. References: SYSTEM$CLUSTERING_DEPTH, https://docs.snowflake.com/en/sql-reference/functions/system_clustering_depth Understanding and Measuring Clustering Depth

FAQ

How many practice questions are available for DEA-C02?

This question bank includes 162 DEA-C02 practice questions covering single and multiple choice, each with answers and explanations.

Are DEA-C02 practice questions available in Chinese and English?

Yes, DEA-C02 practice questions are provided in both Chinese and English.

Can I try DEA-C02 practice questions for free?

Yes. Free sample questions are available on this page, and the full question bank is available after signing up on Zhangxuetu.