Courseiva

SnowPro Advanced: Data Engineer (DEA-C02) — Questions 151–225

229 questions total · 4pages · All types, answers revealed

Page 2

Page 3 of 4

Page 4
151
MCQmedium

A data engineer runs a long-running aggregation query and inspects the Query Profile. The profile shows a single operator with an output row count roughly 400 times larger than its input row count, and the downstream operator is bottlenecked. Which action should the engineer take to resolve this?

A.Enable the Search Optimization Service on the base table so the exploding operator can skip micro-partitions and emit fewer rows.
B.Reduce the number of rows produced by the exploding operator by moving the aggregation to a separate earlier stage or by rewriting the join/grouping logic so cardinality grows later in the plan.
C.Disable the query result cache at the account level so the exploding operator re-executes and produces a smaller result set.
D.Increase the size of the virtual warehouse to add more compute nodes so the exploding operator can process more rows per second.
AnswerB

An operator whose output rows massively exceed its input rows indicates an unintended row explosion, usually from a fan-out join or an incorrect grouping key. Because the explosion happens before the aggregation, the downstream operator must process every duplicated row, so fixing the cardinality growth is the only action that addresses the actual bottleneck.

Why this answer

The decisive clue is an operator emitting far more rows than it receives, which is the signature of a cardinality explosion rather than a compute or pruning problem. Adding warehouse capacity, toggling result caching, or enabling search optimization all leave that multiplication intact. Only restructuring the plan so the aggregation occurs before or alongside the fan-out keeps downstream operators from processing duplicated rows.

Exam trap

The trap here is assuming a large intermediate row count always means insufficient warehouse compute, when the profile is actually pointing to a join or grouping that multiplies rows.

152
MCQmedium

A company is using a Multi-cluster Warehouse (MCW) with a 'Standard' scaling policy. Users report that during peak morning hours, query queuing occurs briefly before a new cluster starts. What is the effect of changing the scaling policy to 'Economy' in this scenario?

A.Queuing will decrease because the Economy policy optimizes cluster distribution.
B.Queuing will increase because the warehouse waits longer to start a new cluster.
C.Performance will remain identical but the total credit consumption will decrease.
D.The warehouse will automatically scale up to a larger T-shirt size.
AnswerB

The Economy policy only starts a new cluster if it estimates there is enough work to keep it busy for at least six minutes. This delay is intended to prevent the frequent starting and stopping of clusters to save credits, but it directly results in longer queue times for users.

Why this answer

The Economy scaling policy prioritizes credit savings over immediate performance by waiting until there is enough consistent load to keep a new cluster busy for six minutes. In this scenario, switching to Economy would likely increase queuing times because the system becomes more conservative about spinning up additional compute resources compared to the Standard policy.

Exam trap

Candidates often select the 'Economy' policy expecting it to improve performance by conserving resources, missing that it actually increases queuing by delaying the startup of new clusters.

153
MCQmedium

A data engineer runs a query on a Snowflake virtual warehouse that scans a 5 TB table but returns only 100 rows. The Query Profile shows that the TableScan operator processed 5 TB of data even though a highly selective filter on a non-clustered column was applied. The warehouse is sized Medium. Which action will most effectively reduce the amount of data scanned by this query?

A.Create a materialized view that selects all columns from the table.
B.Add a clustering key on the filtered column and enable automatic clustering.
C.Increase the warehouse size from Medium to 2X-Large.
D.Add a search optimization service to the table.
AnswerB

Clustering the table on the filtered column co-locates similar values in the same micro-partitions, so the optimizer can prune micro-partitions that cannot contain matching rows. This directly reduces bytes scanned by the TableScan, which is the reported bottleneck. Because the table is large and the filter is highly selective, clustering yields the greatest reduction in I/O and improves performance without resizing the warehouse.

Why this answer

The TableScan reads 5 TB because the filter column is not clustered, so micro-partition pruning cannot eliminate irrelevant data. Adding a clustering key on the filtered column, with automatic clustering enabled, reorganizes micro-partitions so the optimizer can skip most of them. This reduces bytes scanned and directly targets the bottleneck shown in the Query Profile, rather than adding compute or duplicating data.

Exam trap

The trap here is assuming that a larger warehouse reduces the volume of data scanned, when it only increases the speed at which the same bytes are processed.

154
MCQhard

A data engineer is transforming a large fact table using a complex SQL query that includes multiple window functions and joins. The query is executed frequently and must return results with minimal latency. The engineer notices that the query spends significant time on repartitioning data for window functions. Which Snowflake feature should be used to improve performance by pre-organizing the data to avoid repartitioning?

A.Use the RESULT_SCAN function to cache the query results and reuse them.
B.Apply search optimization on the columns used in the window functions.
C.Create a materialized view that pre-computes the window functions.
D.Define a clustering key on the columns used in the PARTITION BY clause of the window functions.
AnswerD

Clustering keys physically sort data by the specified columns, which aligns with the PARTITION BY clause of window functions. This reduces the need for repartitioning during query execution, as data is already co-located. For large tables with frequent window function queries, clustering can significantly improve performance by minimizing data movement.

Why this answer

Clustering keys physically order data by the specified columns, which can align with the PARTITION BY clause of window functions. This reduces the need for Snowflake to repartition data at query runtime, leading to faster execution. For large fact tables with frequent window function queries, clustering is the recommended approach to optimize performance by minimizing data movement.

Exam trap

The trap here is confusing search optimization with clustering; search optimization speeds up point lookups, not window function partitioning.

155
MCQhard

A data engineer wants to share a subset of data with a third party while ensuring sensitive columns are masked. Which governance combination is best?

A.Create a secure view and apply masking policies to the base table columns.
B.Create a standard view with CASE statements for masking.
C.Grant direct access to the base table.
D.Physically clone the table and remove sensitive rows.
AnswerA

Applying masking policies to the base table ensures that even if the underlying data is accessed via a view, the masking rules are still enforced. Using a secure view provides the added benefit of hiding the underlying schema metadata, making this the most secure approach for external data sharing.

Why this answer

The best practice is to combine a Secure View with a Dynamic Data Masking policy. The Secure View provides a clean abstraction layer, while the Masking Policy ensures that the data itself remains protected regardless of how the view is queried. This combination allows for precise data sharing while adhering to strict compliance standards, protecting the organization from data leaks during the sharing process.

Exam trap

Candidates often assume that applying a masking policy to a view is sufficient, forgetting that the policy must be applied to the underlying base table columns to ensure universal data protection.

156
MCQhard

A company clones a 5 TB permanent table named RAW_CLICKS into a development schema using CREATE TABLE DEV.RAW_CLICKS CLONE PROD.RAW_CLICKS. Immediately after the clone, the development team loads 500 GB of new data into DEV.RAW_CLICKS and also updates 100 GB of existing rows. Which statement correctly describes the storage charges that result?

A.Storage charges for the clone are zero until the source table is dropped, because shared partitions are billed to the source.
B.The clone is billed as a full 5.6 TB copy plus Time Travel, because cloning always materializes a complete physical copy for isolation.
C.Storage charges cover only the newly written and modified micro-partitions in DEV.RAW_CLICKS, while the shared unchanged partitions are billed once.
D.The clone immediately doubles storage to 10 TB because cloning copies all micro-partitions.
AnswerC

Cloned tables share micro-partitions with the source, and Snowflake bills each distinct micro-partition once regardless of how many tables reference it. The 500 GB of new loads and 100 GB of updated rows create partitions unique to the clone, which are billed. The unchanged 5 TB remains shared and is charged once across both tables, so the incremental storage attributable to the clone reflects only the changed data.

Why this answer

Zero-copy cloning shares micro-partitions between source and clone, and Snowflake bills each micro-partition once even when multiple tables reference it. Only partitions that the clone modifies or adds become unique and billable to the clone. The 500 GB of new loads and 100 GB of updated rows produce the incremental charge, while the unchanged shared partitions are not double-billed.

Exam trap

The trap here is assuming a clone immediately duplicates storage, when in reality only micro-partitions that diverge from the source generate additional storage charges.

157
MCQhard

A Snowflake account uses Enterprise Edition. A permanent table FACT_ORDERS with DATA_RETENTION_TIME_IN_DAYS set to 14 is dropped at 10:00 on Monday. On Wednesday at 10:00, the engineer runs UNDROP TABLE FACT_ORDERS. Immediately after the UNDROP, what is the DATA_RETENTION_TIME_IN_DAYS value for the restored table?

A.0, because a dropped table's retention is reset to zero during the drop operation.
B.1, because the default retention for a restored table reverts to the account-level default of one day.
C.90, because UNDROP always promotes the restored table to the maximum retention allowed by the account edition.
D.14, because UNDROP restores the table with its original retention setting intact.
AnswerD

UNDROP restores the table object along with the retention configuration it had at the time of the drop. Since FACT_ORDERS had a 14-day retention period when it was dropped, the restored table retains that same 14-day setting, and the remaining Time Travel window continues from the original drop timestamp.

Why this answer

UNDROP restores a dropped table with the same properties it had at drop time, including its DATA_RETENTION_TIME_IN_DAYS value. Since FACT_ORDERS had 14 days configured, the restored table again has 14 days of retention. The original drop timestamp governs how much of the Time Travel window remains, not a reset to a default value.

Exam trap

The trap here is assuming UNDROP resets retention to an account default, when in fact the table's original retention property is preserved through the drop and restore cycle.

158
MCQeasy

Which Snowflake edition is required to support a 90-day Time Travel retention period?

A.Standard Edition.
B.Enterprise Edition.
C.Any edition supports 90 days by default.
D.Only the Trial Edition.
AnswerB

Enterprise Edition and higher (including Business Critical) are specifically designed to support long-term Time Travel up to 90 days. This capability allows organizations to meet rigorous compliance and historical data access requirements that are not achievable within the standard 1-day retention limit of the entry-level edition.

Why this answer

Snowflake's Time Travel feature scales its capability based on the edition. Standard Edition is limited to a 1-day retention period. Enterprise Edition and Business Critical Edition support up to 90 days.

This tier-based differentiation is a fundamental concept in Snowflake's storage and data protection architecture, requiring architects to align their service level agreements with the appropriate edition to meet data recovery and compliance needs.

Exam trap

Candidates often confuse the feature availability between editions, incorrectly assuming that Standard Edition supports the 90-day retention period, which is exclusive to Enterprise and higher tiers.

159
MCQmedium

Which approach is most effective for managing governance policies across a large, multi-schema data warehouse environment?

A.Create policies within each individual schema.
B.Deploy policies to a centralized database and schema.
C.Use a single shared role for all policy management.
D.Manually recreate all policies in every environment.
AnswerB

Centralizing governance objects enables a single source of truth for security policies. This simplifies the management of privileges and makes auditing significantly easier, as all policies are located in one place. It also allows for clear separation of duties between the security team and the data engineering team.

Why this answer

Centralizing governance objects in a dedicated 'GOVERNANCE' database is the best practice. By keeping policies, tags, and data classification results in a single, well-controlled schema, organizations ensure consistency and ease of maintenance. This centralized approach simplifies access control for the security team and allows for easier auditing of policy changes compared to scattering governance artifacts across disparate, business-specific databases or schemas.

Exam trap

Candidates often suggest creating policies in every schema to keep them 'local'. This creates a management nightmare, making it impossible to audit or update governance policies consistently across the environment.

160
MCQmedium

Which function is best suited for converting a string representation of a JSON object into a VARIANT type within a transformation query?

A.TO_VARIANT()
B.TRY_CAST(data AS VARIANT)
C.PARSE_JSON()
D.TO_JSON()
AnswerC

PARSE_JSON is the specific function built to transform a string containing JSON into a hierarchical VARIANT object. This enables the use of Snowflake's native path-based querying, which is essential for transforming complex, nested data into relational structures during the pipeline process.

Why this answer

The PARSE_JSON function is the standard Snowflake tool for casting string data into the VARIANT format. Once in the VARIANT format, the data can be queried using path notation (e.g., col:field), enabling powerful transformations on nested or semi-structured data. This is a foundational operation in data ingestion pipelines where raw data often arrives as strings in CSV or Parquet files.

Exam trap

Candidates often confuse TO_VARIANT with PARSE_JSON. While both relate to semi-structured data, PARSE_JSON is the specific function required to convert a raw string into a queryable JSON object.

161
MCQmedium

A data engineer is transforming semi-structured event logs stored in a VARIANT column named event_data. The column contains an array of objects under the key 'items', where each object has a 'product_id' and a 'quantity'. The engineer needs to produce one row per product per event, with the event's timestamp and user ID repeated. Which SQL construct should be used to achieve this transformation?

A.Employ a recursive common table expression (CTE) to iterate over the array elements and output one row per element.
B.Use the PARSE_JSON function to convert event_data:items into a relational table with columns for product_id and quantity.
C.Use the LATERAL FLATTEN function on event_data:items to expand the array into separate rows.
D.Apply the ARRAY_AGG function to event_data:items to concatenate the array elements into a single string.
AnswerC

LATERAL FLATTEN is designed to explode semi-structured arrays into multiple rows, preserving the parent row's context. Applied to event_data:items, it yields one row per element, making product_id and quantity accessible via VALUE:product_id and VALUE:quantity. This directly satisfies the requirement to produce one row per product per event while repeating the event timestamp and user ID.

Why this answer

LATERAL FLATTEN is the idiomatic Snowflake construct for expanding semi-structured arrays into rows. When applied to event_data:items, it produces one row per array element, allowing direct access to nested attributes like product_id and quantity. Other options either aggregate, parse, or manually iterate, none of which efficiently achieve the required row-level expansion while preserving parent context.

Exam trap

The trap here is assuming that aggregation functions like ARRAY_AGG can unnest arrays, when in fact they perform the opposite operation.

162
MCQhard

A data engineer is transforming a large table with a VARIANT column that contains nested arrays. The goal is to produce one row per element in the array, preserving all other columns. The engineer uses the FLATTEN function with the LATERAL keyword. Which behavior should the engineer expect when the VARIANT column contains an empty array?

A.The row is retained with NULL values for the flattened columns.
B.The row is omitted from the result set because FLATTEN produces no rows for an empty array.
C.The query fails with an error because FLATTEN cannot process empty arrays.
D.The row is retained with an empty array in the flattened column.
AnswerB

When FLATTEN is applied to an empty array, it generates zero output rows. With a LATERAL join, the outer row is eliminated because there are no matching rows from the flattened side. This is standard SQL behavior for lateral joins with empty sets. The engineer must be aware that empty arrays cause data loss unless handled with an outer join or a default value.

Why this answer

FLATTEN with LATERAL produces one row per element in the array. When the array is empty, there are no elements, so no rows are generated, and the outer row is excluded from the result. This is consistent with inner join semantics.

To retain such rows, an outer join with LATERAL FLATTEN is needed. The correct expectation is that the row is omitted.

Exam trap

The trap here is assuming that an empty array will yield a row with NULLs, when in fact it yields no rows and can silently drop data in an inner lateral join.

163
MCQmedium

A data engineer loads CSV files into a Snowflake table using COPY INTO from an internal stage. Some rows fail validation because a numeric column contains non-numeric text. The engineer wants the load to continue and capture the rejected rows for later analysis. Which approach should be used?

A.Set ON_ERROR = 'CONTINUE' and configure VALIDATION_MODE = 'RETURN_ERRORS'
B.Set ON_ERROR = 'ABORT_STATEMENT' and review the query history for the failed statement
C.Set ON_ERROR = 'SKIP_FILE' and rely on the load history to identify which files were skipped
D.Set ON_ERROR = 'CONTINUE' and use the COPY statement's error output to query rejected rows
AnswerD

ON_ERROR = 'CONTINUE' allows the load to proceed past rows that fail validation, skipping them while loading valid rows. Snowflake records the rejected rows and their error details, which can be retrieved from the COPY command's result or from the load history. This matches the requirement to continue loading and capture rejects for analysis.

Why this answer

ON_ERROR = 'CONTINUE' is designed for tolerant loading: rows that fail conversion or validation are skipped, valid rows are inserted, and Snowflake retains error details that can be queried from the COPY result or load history. This allows the pipeline to proceed while preserving rejected rows for later inspection and remediation.

Exam trap

The trap here is treating VALIDATION_MODE as a runtime error handler, when it actually performs a validation-only pass that does not load data.

164
MCQeasy

A data engineer is investigating a slow query that scans a large table. The Query Profile shows that the table scan is reading a very high number of micro-partitions compared to the total number of partitions in the table. The query filters on a column that is not the clustering key. What is the most likely explanation for the high number of partitions read?

A.The query is using a full table scan because the filter column is not indexed.
B.The table has too many columns, causing the scan to read all partitions.
C.The table is not clustered on the filter column, so pruning is ineffective.
D.The warehouse is too small, causing the scan to read partitions multiple times.
AnswerC

When a table is not clustered on the filter column, the micro-partition metadata may show wide ranges for that column, causing the optimizer to scan many partitions to find matching rows. Without clustering, data is organized by insertion order, which often leads to overlapping values and poor pruning. This directly explains the high number of partitions read.

Why this answer

Pruning efficiency depends on how well data is clustered on the filter column. Without clustering, micro-partitions contain overlapping values, so the optimizer cannot skip many partitions. This results in a high number of partitions read.

Warehouse size, indexing, and column count do not affect the number of partitions scanned in Snowflake.

Exam trap

The trap here is assuming that a small warehouse or lack of indexes causes more partitions to be read, when pruning is purely a metadata and clustering concern.

165
MCQmedium

A data engineer notices that a recurring daily query that joins a large fact table with a date dimension is taking longer than expected. The query filters on a date range and joins on a date key. The fact table is clustered by date_key, and the date dimension is small. The query profile shows a Cartesian join warning. Which action should the engineer take to resolve the Cartesian join and improve performance?

A.Ensure the join condition uses the correct columns and is not accidentally omitted.
B.Add a WHERE clause to filter the date dimension to the same range as the fact table.
C.Add a clustering key on the date dimension's date key.
D.Increase the warehouse size to handle the larger result set.
AnswerA

A Cartesian join warning indicates that the join is producing a Cartesian product, typically because the join condition is missing, always true, or uses incorrect columns. The engineer should verify that the join predicate correctly matches the date_key in the fact table to the primary key in the date dimension. Fixing the join condition eliminates the Cartesian product, reducing the result set to the intended matches and dramatically improving performance. This is the direct solution to the warning.

Why this answer

A Cartesian join warning in the query profile signals that the join is producing a Cartesian product, usually due to a missing or incorrect join condition. The most direct fix is to ensure the join predicate correctly matches the fact table's date_key to the date dimension's key. This eliminates the Cartesian product, reducing the result set and improving performance.

Other options like filtering or scaling up do not address the root cause and may lead to incorrect results or inefficiency.

Exam trap

The trap here is assuming that performance issues from a Cartesian join can be solved by adding filters or more resources, when the real fix is correcting the join condition.

166
Multi-Selecthard

A data engineer is designing a storage strategy for a Snowflake account. The engineer wants to reduce Fail-safe storage costs and must understand which table types are exempt from Fail-safe. (Choose two.)

Select 2 answers
A.Permanent tables with DATA_RETENTION_TIME_IN_DAYS set to 0
B.Temporary tables
C.External tables referencing cloud storage files
D.Transient tables
E.Permanent tables in a database with a short retention default
AnswersB, D

Temporary tables exist only within a session and are dropped automatically when the session ends. They have minimal Time Travel and no Fail-safe coverage, so they do not incur Fail-safe storage costs. For session-scoped scratch data, temporary tables provide the lowest protection and lowest storage overhead, matching the engineer's cost-reduction goal.

Why this answer

Fail-safe applies only to permanent tables. Transient and temporary tables are exempt, so they do not generate Fail-safe storage costs. This makes them suitable for data that can be recreated or that only needs short-term protection, while permanent tables continue to carry the 7-day Fail-safe window after Time Travel expires.

Exam trap

The trap here is assuming that setting retention to 0 on a permanent table removes Fail-safe, when Fail-safe is tied to table type, not retention.

167
MCQhard

A data engineer runs a transformation that loads a 50 GB staged file into a target table using a COPY INTO statement with a single large file. The warehouse is a MEDIUM multi-cluster warehouse. The load takes far longer than expected because one node processes the entire file. Which change most directly improves load throughput?

A.Split the staged file into multiple smaller files of roughly 100-250 MB compressed and load them in the same COPY INTO statement.
B.Set the ON_ERROR option to CONTINUE and re-run the COPY INTO statement.
C.Enable multi-cluster scaling by setting the maximum cluster count to four on the warehouse.
D.Increase the warehouse size from MEDIUM to 4X-LARGE before running the same COPY INTO statement.
AnswerA

COPY INTO parallelizes work across the files in a stage, so a single monolithic file forces one thread to process the entire load. Splitting the data into many smaller compressed files lets the warehouse distribute file processing across nodes, dramatically increasing throughput. The 100-250 MB compressed target size is the recommended range that balances parallelism against per-file overhead, making this the most direct fix for the described bottleneck.

Why this answer

COPY INTO distributes work per file, so throughput scales with the number of files rather than the size of the warehouse. Breaking a single large file into many moderately sized compressed files enables parallel processing across nodes, which is the direct remedy for a load dominated by one file.

Exam trap

The trap here is reaching for a larger warehouse or multi-cluster scaling when the real constraint is that a single file cannot be parallelized.

168
MCQeasy

What is the primary purpose of the 'VALIDATION_MODE' parameter in the COPY INTO <table_name> statement?

A.To automatically correct data type mismatches during the load process.
B.To check the files for errors and return the results without loading the data into the table.
C.To verify that the person executing the command has the correct IAM permissions on the S3 bucket.
D.To compare the data in the stage with the data already in the table to find duplicates.
AnswerB

This mode is used for 'dry runs'. It scans the staged files and reports any issues (like delimiter problems or type mismatches) that would cause the load to fail. This helps prevent corrupted or partial loads and is a best practice when setting up new data movement tasks.

Why this answer

The VALIDATION_MODE parameter allows data engineers to test their COPY commands without actually committing any data to the table. It parses the files and identifies errors, which is a critical step in data movement pipelines to ensure that file formats and mappings are correct before performing a potentially expensive or large-scale ingestion.

Exam trap

Candidates often confuse VALIDATION_MODE with a dry-run insert that actually tests constraints, when it exclusively parses files and returns errors without loading data.

169
Multi-Selectmedium

Which TWO of the following are true regarding the use of Snowflake Data Classification?

Select 2 answers
A.Data classification can only be applied to existing tables.
B.The process uses system-defined tags to label sensitive data.
C.Classification results are stored in the user's local file system.
D.Classification requires the data to be in a flat file format.
E.Users can review and modify the tags suggested by the classification process.
AnswersB, E

Snowflake's data classification service uses a set of predefined system tags, such as 'SNOWFLAKE.CORE.EMAIL' or 'SNOWFLAKE.CORE.PHONE', to identify and label columns. These tags help categorize data automatically, allowing administrators to apply governance policies based on these labels rather than manually tagging every column in the database.

Why this answer

Snowflake Data Classification automatically identifies PII and sensitive data within tables, assigning system tags to columns. This process significantly reduces the manual effort required for governance. It works by scanning sample data and applying semantic labels, which can then be used to trigger automated protection measures like masking policies.

Understanding how this automates compliance is essential for any modern data engineer managing large, dynamic datasets.

Exam trap

Candidates often assume data classification automatically enforces security policies, forgetting that classification only suggests tags and requires manual or automated policy association.

170
MCQeasy

A data engineer is working with a table that contains a column of type VARCHAR storing JSON strings. The engineer needs to transform this column into a VARIANT type to leverage Snowflake's semi-structured data functions. Which function should be used to convert the VARCHAR column to VARIANT?

A.CAST
B.TO_VARIANT
C.TRY_PARSE_JSON
D.PARSE_JSON
AnswerD

PARSE_JSON interprets a string as a JSON document and returns a VARIANT. It is specifically designed to convert JSON-formatted strings into Snowflake's semi-structured VARIANT type, allowing access to nested fields using colon notation. This is the correct function for this transformation.

Why this answer

PARSE_JSON is the dedicated function for converting a JSON-formatted string into a VARIANT. It parses the string and creates a structured object that can be queried using Snowflake's semi-structured data functions. This transformation is essential for enabling access to nested JSON elements and is the recommended approach for converting VARCHAR JSON to VARIANT.

Exam trap

The trap here is assuming that TO_VARIANT or CAST can parse JSON; they only convert the string as a scalar, not as structured JSON.

171
MCQeasy

A data engineer must unload query results from a Snowflake table into a named internal stage so another team can download the files. The engineer wants the unloaded data to be encodable in a columnar format. Which command should be used?

A.PUT file://local_data.csv @my_stage/path/ AUTO_COMPRESS = TRUE;
B.COPY INTO @my_stage/path/ FROM my_table FILE_FORMAT = (TYPE = PARQUET);
C.CREATE STAGE my_stage FILE_FORMAT = (TYPE = PARQUET);
D.GET @my_stage/path/ file://local_path;
AnswerB

COPY INTO with a stage target unloads table or query results to that stage, and specifying TYPE = PARQUET writes columnar files. Using the @my_stage/path/ syntax directs output to the named internal stage, which the other team can then access according to their granted privileges.

Why this answer

COPY INTO targeting a stage is the unload mechanism, and pairing it with TYPE = PARQUET produces columnar files in the named internal stage. GET and PUT move files between local storage and stages, and CREATE STAGE only defines the object, so none of those perform the required table-to-stage unload.

Exam trap

The trap here is confusing stage management commands with data movement; only COPY INTO with a stage target actually unloads table data.

172
MCQmedium

What is the primary benefit of using Snowflake's Object Tagging for cost attribution?

A.It automatically reduces the storage costs by compressing data.
B.It allows costs to be associated with specific business projects.
C.It enables query results to be cached more efficiently.
D.It replaces the need for Resource Monitors.
AnswerB

By applying tags to databases or schemas, organizations can monitor usage and associate costs with specific projects or departments. This visibility is essential for cost management, as it allows leadership to identify high-cost areas and optimize resource consumption based on actual business value and departmental activity.

Why this answer

Object Tagging allows organizations to assign costs to specific business units, projects, or applications by labeling the tables and schemas they use. This is critical for internal showback/chargeback models. By tracking resource usage at the tagged object level, finance teams can accurately map Snowflake costs to specific departments, encouraging better resource management and accountability across the organization's data footprint.

Exam trap

Candidates often assume object tags directly compute warehouse compute costs, missing that tags only label objects for cost attribution while actual warehouse costs are tracked via WAREHOUSE_METERING_HISTORY.

173
MCQmedium

An organization wants to track all data access in their Snowflake account for compliance. They need to know which columns were accessed by which queries, and they want to retain this information for at least one year. Which Snowflake feature should they use to meet this requirement?

A.Login History
B.Object Dependencies
C.Access History
D.Query History
AnswerC

Access History captures column-level access information for queries, including which columns were read and written. It is designed for auditing and compliance, and the data is retained for 365 days. This meets the requirement of tracking column access and retaining for one year. Therefore, Access History is the correct feature.

Why this answer

Access History is specifically designed to provide column-level access auditing, capturing which columns were read or written by queries. It retains data for 365 days, satisfying the one-year retention requirement. Query History lacks column-level detail and has a shorter retention.

Login History and Object Dependencies do not track data access. Thus, Access History is the correct feature.

Exam trap

The trap here is assuming that Query History includes column-level access details, when it only records query metadata.

174
MCQmedium

A data engineer manages a transient table named STG_EVENTS with DATA_RETENTION_TIME_IN_DAYS set to 0 in a Snowflake Enterprise Edition account. A batch job accidentally truncates the table at 02:00. The engineer attempts to recover the lost rows using Time Travel queries against the table's historical versions but finds no historical data available. Which statement explains why the historical data is unavailable?

A.Historical data is only accessible through Fail-safe, which requires a support ticket and is not queryable directly.
B.Transient tables do not support Time Travel; only permanent tables can have historical versions retained.
C.The table's Time Travel retention was set to 0, so no historical versions were retained and the truncated data is unrecoverable via Time Travel.
D.The TRUNCATE operation bypasses Time Travel and immediately purges all historical micro-partitions regardless of retention settings.
AnswerC

With DATA_RETENTION_TIME_IN_DAYS set to 0, Snowflake retains no historical versions for the table, so queries using AT or BEFORE clauses return no prior state. Because the batch job truncated the table, the only recovery path would have been Time Travel, which was effectively disabled by the zero-day retention setting.

Why this answer

Transient tables support Time Travel, but their retention period can be set to zero, and when it is, Snowflake stores no historical versions. Because the engineer configured zero-day retention on STG_EVENTS, no prior state exists to query after the truncation, making Time Travel recovery impossible. The retention setting, not the table type or the truncation operation, is the controlling factor.

Exam trap

The trap here is assuming transient tables never support Time Travel, when in fact they do but are limited to a maximum of one day of retention and can be set to zero.

175
MCQhard

A data engineer is optimizing a query that aggregates a large sales table by product category and region. The query currently uses a GROUP BY on two high-cardinality columns and produces a large intermediate result set. The query profile shows significant network traffic and remote spilling. The engineer wants to reduce remote spilling without changing the aggregation logic. Which approach is most likely to achieve this?

A.Add a clustering key on the product category column.
B.Rewrite the query to use a two-step aggregation with a temporary table.
C.Enable the query acceleration service on the warehouse.
D.Increase the warehouse size to provide more memory per node.
AnswerD

Remote spilling happens when intermediate results exceed local memory and are written to remote storage. Increasing the warehouse size allocates more memory per node, allowing the aggregation to process larger partitions in memory and reducing the need to spill remotely. This directly addresses the memory constraint without altering the query. While other options might have indirect benefits, scaling up the warehouse is the most straightforward way to mitigate remote spilling caused by memory-intensive aggregations.

Why this answer

Remote spilling occurs when an operation's intermediate results exceed available memory and are written to remote storage. Increasing the warehouse size provides more memory per node, which can accommodate larger intermediate results and reduce or eliminate remote spilling. While clustering and query acceleration can improve performance in other ways, they do not directly address the memory pressure of the aggregation.

Rewriting the query might help but is not as direct or reliable as scaling up.

Exam trap

The trap here is assuming that clustering or query acceleration will fix spilling, when the core issue is memory capacity for the aggregation operation.

176
MCQmedium

Which of the following describes the purpose of the 'Result Cache' in Snowflake?

A.It stores data blocks to improve subsequent table scans.
B.It provides instant access to query results without compute costs.
C.It allows users to manually clear cache for specific tables.
D.It persists query results permanently in the user's stage.
AnswerB

The Result Cache stores the output of previous queries. When a subsequent query matches the original exactly, Snowflake retrieves the results from the cache instead of running the query again. This avoids the need to spin up or utilize a warehouse, resulting in zero cost for that specific operation.

Why this answer

The Result Cache is a managed feature that stores the output of a query for a period (typically 24 hours). If an identical query is submitted later, Snowflake returns the cached results immediately without using any compute resources. This is a critical performance and cost optimization tool, as it eliminates the need to re-process large datasets for common, repeated queries, providing near-zero latency and zero credit consumption.

Exam trap

Test-takers frequently confuse the Result Cache with virtual warehouse caches, assuming that active warehouse compute credits are required to retrieve previously executed identical query outputs.

177
MCQhard

A data engineer is using Snowflake's Time Travel feature to recover a table that was dropped 2 days ago. The table was a permanent table with DATA_RETENTION_TIME_IN_DAYS set to 1. The engineer attempts to use UNDROP TABLE but receives an error. What is the most likely reason for the failure?

A.The table's Time Travel retention period has expired, and the table is now in Fail-safe.
B.The user lacks the necessary privileges to perform UNDROP on the table.
C.The table name was reused by another table, so UNDROP cannot restore the original.
D.The table was created as a transient table, so UNDROP is not supported.
AnswerA

With DATA_RETENTION_TIME_IN_DAYS set to 1, the table is recoverable via Time Travel for only 1 day after being dropped. After 2 days, the Time Travel period has expired, and the table has moved to Fail-safe, which does not support UNDROP. Thus, the UNDROP fails because the table is no longer in Time Travel.

Why this answer

A permanent table with 1-day Time Travel retention is recoverable via UNDROP only within that 1-day window. After 2 days, the table has moved to Fail-safe, which does not support UNDROP. Therefore, the UNDROP fails because the Time Travel period has expired.

Other options like transient table type, privileges, or name reuse are not applicable in this scenario.

Exam trap

The trap here is confusing Time Travel recovery with Fail-safe recovery, assuming UNDROP works during Fail-safe.

178
MCQmedium

A data engineer maintains a transient table named RAW_EVENTS in a Snowflake Enterprise Edition account. The table currently has DATA_RETENTION_TIME_IN_DAYS set to 1. The engineer attempts to run ALTER TABLE RAW_EVENTS SET DATA_RETENTION_TIME_IN_DAYS = 14; and the statement fails. What is the reason for the failure?

A.The account is on Enterprise Edition, which limits Time Travel to 1 day for all table types.
B.Time Travel retention can only be increased during the table creation statement, not with ALTER TABLE.
C.Transient tables support a maximum Time Travel retention of 1 day, so 14 days exceeds the allowed limit.
D.The table must be cloned before its retention period can be modified beyond the default.
AnswerC

Transient tables are capped at a maximum Time Travel retention of 1 day regardless of account edition. Setting 14 days exceeds that ceiling, so the statement is rejected. The 1-day value is the only valid nonzero retention for transient objects, which is why the attempt to extend it fails in this scenario.

Why this answer

Transient tables are designed for data that does not require long recovery windows, so Snowflake caps their Time Travel retention at 1 day. Attempting to set 14 days violates that cap and the ALTER statement fails. Permanent tables, by contrast, can go up to 90 days on Enterprise Edition, which is the distinction the engineer is missing.

Exam trap

The trap here is assuming that a higher account edition raises the Time Travel limit for every table type, when transient tables remain capped at 1 day.

179
MCQmedium

A data engineer is building a transformation pipeline that must read semi-structured events from a stage, parse them, and write the output to a target table. The pipeline will run on a schedule and must be version-controlled and testable like other software artifacts. The team wants to avoid writing SQL scripts that are hard to unit test. Which Snowflake feature should the engineer use to implement this transformation?

A.A materialized view over the stage
B.A series of SQL scripts executed by a task
C.Snowpipe with a transformation function
D.Snowpark with a Python stored procedure
AnswerD

Snowpark lets the engineer write transformations in Python, which can be unit tested with standard frameworks before deployment. The code can be stored in a Git repository and executed as a stored procedure or in a Snowpark session. This aligns with the requirement for version control and testability, unlike pure SQL scripts. It also handles semi-structured data natively through DataFrame APIs.

Why this answer

Snowpark is the appropriate choice because it allows developers to write transformation logic in Python, which can be unit tested and version controlled. It also integrates with Snowflake's compute and handles semi-structured data. The other options either lack testability, are not designed for complex transformations, or are technically invalid for the described use case.

Exam trap

The trap here is assuming that any scheduled SQL execution provides the same software engineering benefits as a programming language, when in fact testability and version control are not inherent to SQL scripts.

180
MCQhard

A data engineer is using COPY INTO to load data from an external stage into a table. The source files contain a column with values like '00123' that must be stored as a VARCHAR to preserve leading zeros. The target column is defined as VARCHAR(10). During the load, the engineer notices that the leading zeros are being stripped and the values are stored as '123'. What is the most likely cause?

A.A transformation in the COPY INTO statement is casting the field to a numeric type before loading, removing the leading zeros.
B.The file format has the PARSE_JSON or similar option that interprets numeric-looking strings as numbers.
C.The file format has the STRIP_OUTER_ARRAY option enabled, which removes leading zeros from string values.
D.The target column is implicitly cast to a numeric type because the COPY INTO statement does not specify a transformation.
AnswerA

If the COPY INTO statement includes a transformation such as $1:column::NUMBER or TO_NUMBER($1), the string is converted to a number, which drops leading zeros. The resulting numeric value is then implicitly cast back to VARCHAR for the target column, but the zeros are already lost. Removing or changing the transformation preserves the original string.

Why this answer

The most likely cause is a transformation in the COPY INTO statement that casts the field to a numeric type. Numeric conversion drops leading zeros, and the subsequent cast to VARCHAR cannot restore them. Ensuring the field is treated as a string throughout the load, or removing the numeric cast, will preserve the original formatting.

Exam trap

The trap here is assuming that the target column's VARCHAR definition protects the data, when an inline transformation can convert it to a number before it ever reaches the column.

181
MCQhard

A data engineer is analyzing a Query Profile for a query that joins three large tables. The profile shows that the optimizer chose a broadcast join for one of the joins, but the broadcasted table is 50 GB. The query is spilling to remote disk. Which action is most likely to improve performance by changing the join strategy?

A.Add a clustering key on the join columns of all three tables.
B.Increase the warehouse size to 4X-Large.
C.Rewrite the query to use a CROSS JOIN instead of an INNER JOIN.
D.Collect statistics on the join columns and ensure the tables are not stale.
AnswerD

The optimizer relies on statistics to estimate cardinality and choose join strategies. If statistics are stale or missing, it may incorrectly estimate the broadcasted table as small and choose a broadcast join. Refreshing statistics on the join columns gives the optimizer accurate row counts, allowing it to select a more appropriate join strategy, such as a hash join with a smaller build side, reducing spilling.

Why this answer

The optimizer chose a broadcast join for a 50 GB table, which is inefficient and causes spilling. This often happens when statistics are stale or missing, leading to underestimation of the table size. Collecting statistics on the join columns provides accurate cardinality estimates, enabling the optimizer to choose a better join strategy, such as a hash join with a smaller build side.

This directly addresses the root cause.

Exam trap

The trap here is assuming that a larger warehouse fixes a poor join strategy, when the real issue is likely inaccurate statistics driving the optimizer's choice.

182
Multi-Selecthard

When unloading data from Snowflake to an external stage, which TWO of the following are supported file formats?

Select 2 answers
A.CSV
B.XLSX
C.Parquet
D.SQL
E.PDF
AnswersA, C

CSV is a natively supported format for unloading data from Snowflake. It is widely compatible with most analytical and spreadsheet applications, making it a standard choice for exporting data to external systems that require simple, tabular data structures for their own processing or analysis requirements.

Why this answer

Unloading data is just as important as loading. Snowflake supports CSV, JSON, and Parquet for unloading, providing flexibility for downstream systems. Understanding which formats are natively supported allows engineers to choose the right format for compatibility with external tools (like BI platforms or data lakes) without needing additional transformation steps, making the data movement process more efficient and standardized.

Exam trap

Candidates often select options like 'XML' or 'XLSX' which are not natively supported formats for standard unloading, failing to recognize that Snowflake focuses on CSV, JSON, and Parquet.

183
MCQeasy

An analytics team wants to let external partners query a curated set of rows from a Snowflake table through a secure share. The partners use their own Snowflake accounts and must not be able to see any rows outside the curated set. Which approach should the data engineer use?

A.Create a secure view that filters the base table, grant the share access to the view, and add the view to the share.
B.Grant the share SELECT on the base table and rely on a row access policy to filter rows for the partners.
C.Create a materialized view of the curated rows and add it to the share for the partners to query.
D.Add the base table to the share and instruct partners to query only the approved rows using their own filters.
AnswerA

A secure view hides its definition and the underlying base table from consumers, and sharing the view rather than the table restricts partners to exactly the rows the view exposes. This is the standard pattern for row-level curation in a share and prevents consumers from querying the base table directly.

Why this answer

Secure views are the supported way to expose a constrained subset of data in a share. Because the view definition is hidden and the base table is not shared, consumers can query only the curated rows. This satisfies both the access requirement and the restriction that partners must not see the full table.

Exam trap

The trap here is assuming that a row access policy attached to a shared base table enforces row filtering for external consumers, when sharing a secure view is the reliable control.

184
MCQmedium

Refer to the exhibit. A data engineer runs this query to investigate clustering costs. The output shows high credit consumption but the 'Clustering Depth' of the table remains high. What is the most likely cause of this behavior?

A.The table is being continuously updated with data that overlaps existing ranges.
B.The clustering key is defined on a column with a 'Date' data type.
C.The warehouse used for clustering is too small for the table size.
D.The Search Optimization Service is conflicting with the clustering service.
AnswerA

When new data is inserted or existing data is updated in a way that creates overlapping ranges in the clustering key, the clustering service must work harder. If the rate of these changes is high, the service consumes many credits while struggling to keep the table well-organized.

Why this answer

High credit consumption combined with high clustering depth usually indicates that the table is being frequently updated or appended with data that is significantly 'out of order' relative to the clustering key. This causes the Automatic Clustering service to continuously work to re-sort the data, but the constant influx of unsorted data prevents the depth from improving.

Exam trap

Candidates often blame the Automatic Clustering service for being broken. They fail to realize that constant, out-of-order DML updates effectively 'undo' the clustering, causing a loop of expensive, ineffective maintenance.

185
Multi-Selecthard

A Data Engineer is using the COPY INTO <table_name> command to load Parquet files. The source files contain new columns that do not yet exist in the target Snowflake table. Which TWO features or settings should be used to handle this automatically? (Select TWO)

Select 2 answers
A.Set the table property ENABLE_SCHEMA_EVOLUTION = TRUE.
B.Use the MATCH_BY_COLUMN_NAME = CASE_SENSITIVE option in the COPY command.
C.Use the STRIP_OUTER_ARRAY = TRUE file format option to flatten the Parquet data.
D.Set ON_ERROR = 'CONTINUE' to ensure the command doesn't fail when it sees new columns.
E.Apply a UDF in the COPY statement to dynamically cast the Parquet schema to the table.
AnswersA, B

This table-level property is essential for allowing DML operations like COPY to automatically perform DDL changes. Without this setting, even if the COPY command identifies new columns, it will fail or ignore them because it lacks the authorization to alter the underlying table schema during the data loading process.

Why this answer

Snowflake provides schema evolution capabilities to simplify the ingestion of evolving datasets. By enabling the ENABLE_SCHEMA_EVOLUTION property on the table, Snowflake allows the COPY command to modify the table structure. When combined with MATCH_BY_COLUMN_NAME, Snowflake maps the Parquet fields to table columns and automatically adds any missing columns found in the source files to the target table.

Exam trap

Candidates often select only the schema evolution setting and forget that the COPY INTO command must also be explicitly told how to map columns using the match-by-name parameter.

186
MCQeasy

A data engineer notices that a dashboard query is running slowly. The query filters a large table on a column with high cardinality and returns a small number of rows. The engineer wants to improve performance for this specific query pattern. Which Snowflake feature is most appropriate?

A.Query acceleration service
B.Search optimization service
C.Materialized view
D.Clustering key on the filtered column
AnswerB

Search optimization service is designed to accelerate selective point lookups and queries that filter on high-cardinality columns and return a small number of rows. It builds a search access path that allows the optimizer to quickly locate matching rows without scanning all micro-partitions. This directly addresses the slow dashboard query pattern.

Why this answer

Search optimization service is the ideal Snowflake feature for accelerating selective point lookups on high-cardinality columns. It creates a persistent search access path that allows the optimizer to efficiently find matching rows, reducing the need to scan entire micro-partitions. This results in faster response times for dashboard queries that filter on specific values and return few rows.

Exam trap

The trap here is confusing search optimization with clustering or query acceleration, but only search optimization is purpose-built for selective point lookups on high-cardinality columns.

187
MCQmedium

A financial services firm must enforce a policy that only users with the role 'COMPLIANCE_OFFICER' can view rows where the 'ACCOUNT_STATUS' column equals 'DELINQUENT' in the 'LOANS' table. All other users should see only non-delinquent rows. Which Snowflake feature should the data engineer implement to meet this requirement?

A.A network policy that restricts access to the LOANS table based on IP address.
B.A secure view that joins the LOANS table with a role-mapping table and filters rows.
C.A row access policy on the LOANS table that checks the current role and filters rows accordingly.
D.A masking policy on the ACCOUNT_STATUS column that returns NULL for non-compliance roles.
AnswerC

Row access policies are designed to filter rows based on conditions such as the current role. By defining a policy that returns TRUE only when the role is COMPLIANCE_OFFICER or when ACCOUNT_STATUS is not 'DELINQUENT', the engineer enforces exactly the required row-level security. This is the standard Snowflake mechanism for row-level filtering.

Why this answer

Row access policies are the correct Snowflake feature for row-level security. They evaluate conditions such as CURRENT_ROLE() and filter rows accordingly. Masking policies only obfuscate column values, secure views can be bypassed if base table access exists, and network policies operate at the network layer.

Only a row access policy attached to the table enforces the required filtering for all queries.

Exam trap

The trap here is confusing column-level masking with row-level filtering, assuming that masking a column can hide entire rows.

188
MCQmedium

A data engineer needs to filter the results of a complex analytical query based on the result of a window function. The query calculates a rolling average of sales per region and should only return rows where the current sale exceeds that average. Which SQL clause is most efficient for this transformation?

A.The WHERE clause
B.The HAVING clause
C.The QUALIFY clause
D.The GROUP BY clause
AnswerC

The QUALIFY clause is specifically designed to filter the results of window functions after they have been computed. It functions similarly to how HAVING works for aggregates, providing a clean syntax to remove rows that do not meet criteria. This reduces code complexity by eliminating the need for wrapping the primary query in a subquery.

Why this answer

Filtering on window functions requires a mechanism that executes after the window calculations are performed. The QUALIFY clause allows engineers to filter results directly in the SELECT statement without nesting logic inside a subquery or a Common Table Expression. This significantly improves query readability and can lead to internal optimizations by the Snowflake query optimizer during the execution phase.

Exam trap

Candidates often write complex nested subqueries or CTEs to filter window functions, unaware that the QUALIFY clause natively handles this efficiently in the same query block.

189
MCQmedium

A data engineer is working with a table that stores customer orders in a VARIANT column named order_details. The order_details column contains an array of line items under the key 'items'. Each line item is an object with keys 'product_id', 'quantity', and 'price'. The engineer needs to produce a flattened result set where each row represents a single line item with its associated order ID. Which Snowflake function should be used to achieve this transformation?

A.OBJECT_KEYS(order_details:items)
B.PARSE_JSON(order_details:items)
C.ARRAY_TO_STRING(order_details:items, ',')
D.LATERAL FLATTEN(input => order_details:items)
AnswerD

LATERAL FLATTEN is designed to explode arrays into multiple rows. Using it with the input parameter pointing to the items array will produce one row per element in the array. This allows each line item to be represented as a separate row, and the parent order ID can be included via the correlation. This is the standard and most efficient way to flatten arrays in Snowflake.

Why this answer

To transform an array of line items into individual rows, the LATERAL FLATTEN function is the correct choice. It takes a VARIANT array and outputs one row per element, allowing each line item to be processed separately. The other functions either aggregate, extract keys, or parse JSON but do not explode arrays into rows.

Exam trap

The trap here is confusing functions that manipulate arrays with those that explode them, such as using ARRAY_TO_STRING or OBJECT_KEYS instead of FLATTEN.

190
MCQeasy

A data engineer is reviewing a Query Profile for a query that filters a large table on a column with a very high cardinality, such as a UUID. The query applies an equality predicate on that column and returns a single row. The table is not clustered on that column. Which Snowflake feature is designed to accelerate this type of highly selective point lookup?

A.Automatic clustering
B.Search optimization service
C.Materialized view with a cluster by clause
D.Query acceleration service
AnswerB

Search optimization service is specifically designed to accelerate highly selective point lookups and equality predicates on columns, even when the table is not clustered on those columns. It maintains a search access path that allows the optimizer to find matching micro-partitions quickly. For a UUID equality filter returning a single row, this is the intended use case and provides significant latency improvement.

Why this answer

Search optimization service is designed to accelerate highly selective point lookups and equality predicates, such as a UUID equality filter returning a single row. It maintains a search access path that lets the optimizer locate matching micro-partitions without scanning the entire table. Clustering, query acceleration, and materialized views serve different purposes and do not target point lookups as directly.

Exam trap

The trap here is confusing search optimization with clustering, when search optimization is the feature specifically built for highly selective point lookups.

191
MCQmedium

A data engineer is managing a Snowflake account with Enterprise Edition. A permanent table named FINANCE_RECORDS has DATA_RETENTION_TIME_IN_DAYS set to 10. The engineer wants to reduce storage costs by lowering the retention period to 1 day. What is the effect of executing ALTER TABLE FINANCE_RECORDS SET DATA_RETENTION_TIME_IN_DAYS = 1?

A.The change fails because retention periods can only be increased, not decreased, on a permanent table.
B.The change takes effect immediately, and any historical data older than 1 day becomes inaccessible and will be purged, but storage costs may not decrease immediately.
C.The change takes effect immediately, and historical data beyond 1 day is purged, reducing storage costs.
D.The change takes effect immediately, but existing historical data remains accessible for the original 10-day period.
AnswerB

When you reduce the retention period, historical data older than the new period becomes inaccessible and is eventually purged. However, storage costs may not decrease immediately because the data must first be purged from storage, which can take time. Additionally, Fail-safe still applies for 7 days after the retention period, so storage costs for Fail-safe may persist. This is the correct behavior.

Why this answer

Reducing the Time Travel retention period immediately makes historical data beyond the new period inaccessible, and it will be purged. However, storage costs may not decrease immediately due to the time required for purging and because Fail-safe still applies for 7 days after the retention period. The change is allowed and takes effect for all data, not just new data.

Exam trap

The trap here is assuming that reducing retention immediately frees up storage and that existing historical data remains accessible for the original period.

192
MCQeasy

A data engineer is working with a table that has a column `order_date` of type DATE. The engineer needs to create a new column that contains the year and month in the format 'YYYY-MM' (e.g., '2023-01') for each order. Which Snowflake function should be used to produce this formatted string?

A.DATE_TRUNC('month', order_date)
B.CONCAT(YEAR(order_date), '-', MONTH(order_date))
C.EXTRACT(YEAR_MONTH FROM order_date)
D.TO_CHAR(order_date, 'YYYY-MM')
AnswerD

TO_CHAR converts a date or timestamp to a string using the specified format. Using 'YYYY-MM' returns the year and month in the desired format. This is the standard function for formatting dates in Snowflake and is the simplest way to achieve the required transformation.

Why this answer

TO_CHAR with a format string is the correct function to convert a date into a custom string format. It directly produces the 'YYYY-MM' representation, including leading zeros for months. Other options either return a date, invalid syntax, or lack proper formatting.

Exam trap

The trap here is assuming that DATE_TRUNC or EXTRACT can directly produce a formatted string, when they return date or numeric types.

193
MCQhard

A healthcare company implements a Row Access Policy (RAP) on a PATIENTS table to restrict doctor access to only their assigned patients. The RAP references a mapping table. What is the most critical performance consideration when designing this policy for a table with billions of rows?

A.Applying the policy to the mapping table itself to prevent circular references.
B.Ensuring the mapping table is small and uses columns that allow for effective pruning.
C.Using a CASE statement instead of a WHERE clause within the policy definition.
D.Granting the OWNERSHIP privilege of the mapping table to the PUBLIC role.
AnswerB

The performance of a Row Access Policy depends heavily on how well Snowflake can prune data. If the mapping table is large or poorly structured, the policy evaluation can become a bottleneck. Keeping mapping tables lean and indexed via clustering ensures that the join logic does not force unnecessary data scanning.

Why this answer

When Row Access Policies involve joins to mapping tables, Snowflake's optimizer must execute these checks efficiently to avoid full table scans. Using a memoizable function or ensuring the mapping table is small and clustered correctly helps the pruning process. Governance at scale requires balancing strict security logic with the underlying query performance to ensure user experience is maintained.

Exam trap

Candidates often focus on the complexity of the policy logic, ignoring that the join with a large mapping table is the primary bottleneck for performance on massive datasets.

194
MCQhard

Refer to the exhibit. What is the DATA_RETENTION_TIME_IN_DAYS setting for the table after the UNDROP operation?

A.It reverts to the database default.
B.It remains 5.
C.It reverts to the account default.
D.It is reset to 1.
AnswerB

The UNDROP operation restores the table to its exact state, including all defined parameters like DATA_RETENTION_TIME_IN_DAYS. Since it was explicitly set to 5 before the DROP command, that configuration is preserved in the metadata and reapplied upon restoration, ensuring no changes to the intended retention policy occur.

Why this answer

When a table is dropped, its metadata and parameter settings are preserved. When the UNDROP command restores the table, it retrieves the original configuration, including the previously set DATA_RETENTION_TIME_IN_DAYS value of 5. This ensures that object-level policies remain consistent after recovery, allowing the Data Engineer to maintain control over historical data retention settings without needing to reconfigure them after accidental deletions.

Exam trap

Candidates assume dropping and restoring a table resets its configuration parameters to account defaults rather than preserving its original state.

195
MCQmedium

A data steward at a financial services company needs to automatically detect and tag columns containing Social Security numbers across all schemas in the PROD database. The steward wants the tagging to be applied without manually inspecting each table and to leverage Snowflake's built-in classifiers. Which approach should the steward use?

A.Enable Snowflake Access History and use it to identify columns that have been queried with SSN patterns.
B.Use Snowflake Data Classification with a system-defined SSN semantic category and apply it to the PROD database.
C.Write a stored procedure that queries INFORMATION_SCHEMA.COLUMNS for column names containing 'SSN' and applies a tag.
D.Create a custom tag called SSN_TAG and manually apply it to every column that appears to contain SSN data.
AnswerB

Snowflake Data Classification includes built-in semantic categories such as SSN that automatically identify and tag columns containing Social Security numbers. By applying classification to the entire PROD database, the steward can scan all schemas and tables without manual effort. The system assigns tags like SNOWFLAKE.CORE.SSN to matching columns, enabling automated governance.

Why this answer

Snowflake Data Classification automatically scans tables and views to identify sensitive data using system-defined semantic categories, including SSN. Applying it to a database scans all contained schemas and tables, tagging columns that match the SSN pattern. This meets the requirement for automatic detection and tagging without manual intervention, leveraging native governance features.

Exam trap

The trap here is assuming that column name pattern matching or manual tagging is sufficient for sensitive data detection, when only Data Classification analyzes actual data values and applies system-defined tags.

196
MCQmedium

A company requires continuous ingestion of JSON logs from an S3 bucket into a Snowflake table with minimal latency. They decide to use Snowpipe with auto-ingest. How does Snowflake determine which new files need to be processed once the pipe is created?

A.Snowflake performs a metadata scan of the S3 bucket every 60 seconds to identify files with new timestamps.
B.The Snowpipe object uses the LIST command internally to compare the stage contents against the load history table.
C.It relies on event notifications from S3 sent to a Snowflake-managed SQS queue to trigger the pipe.
D.The data engineer must execute the ALTER PIPE... REFRESH command every time new data is uploaded to the stage.
AnswerC

This is the core architecture of Snowpipe auto-ingest. By integrating with S3 Event Notifications, Snowflake receives an asynchronous signal the moment a file is written. This allows the serverless compute resources to spin up only when there is work to do, providing a highly scalable and cost-effective ingestion path.

Why this answer

Snowpipe with auto-ingest relies on cloud-native messaging services to notify Snowflake of new data. When a file is uploaded to S3, an S3 Event Notification is triggered, which sends a message to a Snowflake-managed SQS queue. Snowpipe constantly monitors this queue and triggers the ingestion process as soon as it receives a notification, ensuring near real-time data movement without manual intervention.

Exam trap

Candidates often assume Snowflake 'polls' the S3 bucket directly. They fail to understand the event-driven nature of the SQS queue, which is the actual trigger for the pipe.

197
MCQmedium

What is the effect of the UNDROP command on a table that has already been recreated with the same name?

A.It automatically renames the dropped table with a suffix.
B.It overwrites the existing table with the old version.
C.The UNDROP command fails due to a name collision.
D.It merges the data from both tables.
AnswerC

Because the table name is already in use by the new table, the UNDROP operation will error out. This prevents the unintentional destruction of the new table. The user is required to intervene—either by renaming the new table or dropping it—before the older, dropped version can be successfully brought back.

Why this answer

If a table is dropped and a new table is created with the same name, the UNDROP operation will encounter a name conflict. In such cases, the UNDROP command fails, as the target namespace is already occupied. To recover the dropped table, the user must first rename or drop the new table, then execute UNDROP on the original.

This safety mechanism prevents data loss and accidental overwriting of active production tables.

Exam trap

Candidates assume an UNDROP command will automatically overwrite an existing table with the same name, forgetting that name collisions cause the command to fail.

198
MCQmedium

A data engineer needs to ensure that PII data in the 'SALES' table is obscured for non-admin users while maintaining original data types for downstream analytical models. Which approach provides the most scalable governance?

A.Create separate secure views for every user role requiring masked access.
B.Apply a masking policy to the columns and grant the APPLY MASKING POLICY privilege.
C.Use row-level security to filter rows containing PII data for authorized users.
D.Physically transform the data during the ETL process and store it in a new table.
AnswerB

Applying a masking policy directly to columns provides a centralized way to enforce data governance. By granting the APPLY MASKING POLICY privilege to a governance role, you ensure that security policies are managed by the data security team rather than the database owners, following the principle of least privilege.

Why this answer

Dynamic Data Masking allows policies to be applied to columns based on the user's role without duplicating data. By leveraging masking policies, you maintain a single source of truth while ensuring sensitive information is protected at query runtime. This method is highly scalable as a single policy can be assigned to multiple columns across different tables, simplifying maintenance and ensuring consistent security posture across the enterprise.

Exam trap

Candidates often suggest creating separate views or physical copies of tables, which is inefficient and violates the principle of a single source of truth for governance.

199
MCQmedium

A query is filtering a table based on a 'TRANSACTION_DATE' column using a range (e.g., BETWEEN '2023-01-01' AND '2023-01-31'). The table is 500GB and not explicitly clustered. Why might this query still perform well and show good partition pruning?

A.The Result Cache is automatically storing the range for all users.
B.Snowflake automatically clusters all Date columns by default.
C.The data was inserted in chronological order, creating natural clustering.
D.The query is small enough to fit entirely in the warehouse's metadata cache.
AnswerC

Most time-series data is loaded as it is generated, meaning rows with similar dates are grouped into the same micro-partitions. Snowflake’s metadata tracks the min/max values of every column in each partition, so a range filter on a naturally ordered column can effectively prune most of the table.

Why this answer

Snowflake micro-partitions are immutable and created in the order data is inserted. If the data is naturally loaded in chronological order, the 'TRANSACTION_DATE' values will be naturally clustered within the micro-partitions. This 'natural clustering' allows the metadata-driven pruning to skip partitions that fall outside the date range, even without an explicit clustering key.

Exam trap

Candidates often assume a table must have an explicit clustering key to be fast. They fail to understand that natural data insertion order can provide the same benefits as explicit clustering.

200
MCQmedium

A Data Engineer needs to transform semi-structured JSON data loaded into a VARIANT column named 'raw_data'. The goal is to flatten the 'items' array into individual rows while preserving the 'order_id' from the root level. Which function is the most efficient choice for this transformation?

A.JSON_EXTRACT_PATH_TEXT
B.FLATTEN
C.OBJECT_CONSTRUCT
D.ARRAY_TO_STRING
AnswerB

The FLATTEN function is the standard table function used to explode arrays or objects into separate rows. When applied with a LATERAL join, it maintains the relationship between the root object and the nested collection, providing the necessary tabular structure for further SQL-based data manipulation.

Why this answer

The FLATTEN function is specifically designed to transform semi-structured data into a relational format by producing a lateral view of array elements. By using it in a LATERAL join, the engineer can correlate the parent 'order_id' with each exploded array element effectively. This is a critical pattern in Snowflake for normalizing JSON structures before downstream analytics, ensuring that hierarchical data becomes queryable by standard SQL BI tools.

Exam trap

Engineers often try to use standard SQL joins or array functions without LATERAL, which fails to properly correlate root-level identifiers with exploded array elements.

201
Multi-Selectmedium

Which TWO statements describe the benefits of using Snowflake's 'Change Tracking' for data transformation?

Select 2 answers
A.It eliminates the need for primary keys on tables.
B.It allows for efficient incremental processing of only modified data.
C.It automatically cleans up stale data in the target table.
D.It reduces the amount of data processed in downstream tasks.
E.It is only available for tables in the Enterprise edition.
AnswersB, D

By only processing the rows that have changed (inserts, updates, or deletes), change tracking enables high-performance incremental transformations. This avoids the need to process the entire source table repeatedly, which would otherwise lead to excessive compute costs and increased latency in the data pipeline.

Why this answer

Change Tracking is the underlying mechanism that enables Streams. It allows Snowflake to record which rows were inserted, updated, or deleted, making incremental transformations possible. Instead of scanning entire tables to identify changes, the engine can simply query the stream, which significantly reduces compute time and costs for ETL processes.

This is critical for high-frequency data loading and incremental updates in modern data warehouses.

Exam trap

Test-takers frequently confuse change tracking with time travel or fail to select BOTH correct statements because they only focus on storage rather than downstream performance benefits.

202
MCQhard

A data engineer is working with a table that has a VARIANT column containing JSON objects. Some objects have a key 'discount' with a numeric value, while others have it as a string, and some lack the key entirely. The engineer needs to produce a numeric column 'discount_amount' where missing keys are treated as 0 and string values are cast to numbers. Which expression correctly achieves this?

A.COALESCE(TRY_TO_NUMBER(raw:discount), 0)
B.COALESCE(CAST(raw:discount AS NUMBER), 0)
C.COALESCE(TO_NUMBER(raw:discount), 0)
D.COALESCE(TRY_TO_NUMBER(raw:discount::STRING), 0)
AnswerA

This expression uses TRY_TO_NUMBER on the VARIANT value, which attempts to convert it to a number regardless of whether it is stored as a number or a string. If the conversion fails (e.g., missing key or non-numeric string), it returns NULL, and COALESCE replaces it with 0. This directly handles both numeric and string types and missing keys, making it the correct and efficient solution.

Why this answer

The correct expression uses TRY_TO_NUMBER to safely convert both numeric and string discount values to a number, returning NULL on failure, which COALESCE then replaces with 0. This handles missing keys and invalid strings without causing errors. The other options either use error-prone functions or unnecessary casting steps, making them less reliable for this transformation.

Exam trap

The trap here is using TO_NUMBER or CAST instead of TRY_TO_NUMBER, which can cause query failures when encountering non-numeric or missing values in semi-structured data.

203
MCQeasy

A data engineer runs a dashboard query that aggregates sales by region for the current month. The query scans a large fact table but returns only a few rows. The Query Profile shows that most time is spent scanning micro-partitions that do not contain the current month's data. Which feature should the engineer use to improve performance for this recurring query?

A.Enable the USE_CACHED_RESULT session parameter for the dashboard user.
B.Create a materialized view that pre-aggregates sales by region and month.
C.Increase the warehouse size to a larger multi-cluster warehouse.
D.Add a search optimization service to the fact table on the region column.
AnswerB

A materialized view stores the pre-computed aggregation, so the recurring dashboard query can read a much smaller, pre-aggregated result set instead of scanning the full fact table. Snowflake automatically maintains the materialized view as base data changes, and the optimizer can rewrite queries to use it, dramatically reducing scan time for this repetitive aggregation pattern.

Why this answer

The recurring dashboard query aggregates a large fact table but returns few rows, and the profile shows scanning of unnecessary micro-partitions. A materialized view pre-aggregates sales by region and month, so the query reads a compact result instead of the base table. Snowflake maintains the view automatically and can transparently rewrite the query to use it, cutting scan time and cost for this repetitive pattern.

Exam trap

The trap here is confusing result caching or search optimization with a materialized view, when only a materialized view pre-aggregates and persistently reduces the scanned data for recurring aggregations.

204
MCQeasy

A user runs a query twice in succession with no data changes. The second query completes in near-zero time. What feature is responsible for this performance?

A.Warehouse Local Cache.
B.Metadata Cache.
C.Query Result Cache.
D.Search Optimization Service.
AnswerC

The Query Result Cache is specifically designed to store and reuse the output of previously executed queries. When a query is repeated and the data remains unchanged, Snowflake retrieves the result directly, bypassing the execution process entirely and resulting in near-instant performance for the user.

Why this answer

The Query Result Cache stores the output of every query for a rolling 24-hour period. When a subsequent query matches the exact SQL text and the underlying data in the source tables has not changed, Snowflake returns the result from the cache. This mechanism avoids the need to spin up compute resources or scan data, providing an instantaneous response for repeated queries, which is a major efficiency feature for frequently accessed reports.

Exam trap

Candidates frequently mistake this behavior for warehouse caching or data clustering improvements, failing to identify that the Query Result Cache specifically handles identical SQL executions on unchanged data.

205
MCQmedium

A data engineer needs to identify all columns across a multi-database Snowflake account that have been assigned the 'PII_Type' tag to ensure compliance with a new privacy regulation. Which approach provides the most comprehensive and efficient result for this account-level audit?

A.Query the INFORMATION_SCHEMA.TAG_REFERENCES table function in every database.
B.Use the SYSTEM$GET_TAG function on every table in the account sequentially.
C.Query the TAG_REFERENCES view within the SNOWFLAKE.ACCOUNT_USAGE schema.
D.Execute a SHOW TAGS command and filter for the 'PII_Type' string in the output.
AnswerC

The ACCOUNT_USAGE.TAG_REFERENCES view contains a comprehensive record of all tag associations across the entire Snowflake account, including those in different databases. This view is the standard for account-wide governance and auditing, allowing for a single query to return all objects tagged with specific compliance-related labels.

Why this answer

Snowflake object tagging allows for fine-grained metadata management across the account. Using the ACCOUNT_USAGE.TAG_REFERENCES view is the most efficient way to track PII tags globally, as it aggregates data from all databases. This centralized approach ensures that data engineers can maintain compliance and auditability without needing to query individual database schemas, which is crucial for scalable governance strategies.

Exam trap

Candidates frequently select the Information Schema instead of Account Usage, forgetting that Information Schema only contains data for the current database, not the entire account.

206
MCQmedium

Which object allows a data engineer to assign a security policy based on a user's geographical location attribute?

A.Masking Policy.
B.Row Access Policy.
C.Secure View.
D.Tag-based masking.
AnswerB

Row Access Policies allow for conditional logic that incorporates context functions like CURRENT_USER or session attributes. This enables the implementation of fine-grained access control where rows are only visible if the user's location satisfies specific regulatory requirements or internal business rules defined within the policy's SQL expression.

Why this answer

Row Access Policies are the correct mechanism here. By using a policy that evaluates the current user's session context—specifically looking at attributes like their IP address or a custom 'location' attribute—the policy can filter out rows that the user is not authorized to see based on residency or regional compliance regulations like GDPR, ensuring data sovereignty is upheld throughout the organization.

Exam trap

Candidates often suggest 'Masking Policies' for location-based filtering. Masking hides data content but does not filter out entire rows, which is the specific requirement for location-based access control.

207
MCQhard

A data engineer is configuring a Snowpipe to automatically load Parquet files from an external stage. The files are partitioned by date in the path (e.g., dt=2023-10-01/). The engineer wants to ensure that Snowpipe loads only new files and avoids reprocessing old ones, even if files are added to existing partition paths. The pipe definition includes a PATTERN option. Which approach best ensures that only new files are ingested and that previously loaded files are not reprocessed?

A.Use the PATTERN option to match only files with a specific prefix or regex that includes the current date, and update the pipe definition daily.
B.Rely on Snowpipe's default behavior, which automatically tracks file modification times and skips files older than the pipe creation time.
C.Configure the pipe with a MODIFIED_AFTER parameter set to a timestamp that is updated after each load.
D.Ensure the pipe uses the load history to track processed files; Snowpipe automatically skips files that have already been loaded, even if they appear again.
AnswerD

Snowpipe maintains a load history for each pipe, recording which files have been processed. When new files are detected, it checks the history and skips any file that has already been loaded. This prevents reprocessing of old files, even if they are in existing partitions. This is the default and correct behavior, requiring no additional configuration.

Why this answer

Snowpipe's built-in load history tracks which files have been loaded for each pipe. When new files are staged, Snowpipe compares against this history and only loads files not previously processed. This ensures that previously loaded files are not reprocessed, even if they are in existing partitions.

The other options either rely on non-existent features or require manual intervention that does not guarantee the requirement.

Exam trap

The trap here is assuming that Snowpipe uses file modification times to filter files, when it actually relies on a load history to avoid duplicates.

208
MCQeasy

A data engineer needs to transform a string column containing dates in the format 'YYYY-MM-DD' into a DATE type. The column may contain NULL values and occasionally invalid date strings. The engineer wants the transformation to return NULL for invalid strings without causing the query to fail. Which function should the engineer use?

A.DATE
B.TO_DATE
C.TRY_TO_DATE
D.CAST
AnswerC

TRY_TO_DATE attempts to convert the string to a date and returns NULL if the conversion fails, rather than raising an error. This is ideal for handling invalid date strings gracefully. It also returns NULL for NULL inputs. The function is designed for exactly this scenario, where data quality is uncertain and you want to avoid query failures.

Why this answer

TRY_TO_DATE is specifically designed to return NULL instead of failing when a string cannot be converted to a date. This makes it the correct choice for transforming a column that may contain invalid date strings. TO_DATE and CAST would raise errors, and DATE is not a function.

The engineer should use TRY_TO_DATE to ensure the transformation completes successfully.

Exam trap

The trap here is assuming that TO_DATE or CAST will silently handle invalid dates, when in fact they raise errors and can break the pipeline.

209
MCQeasy

Which of the following describes the primary purpose of Snowflake's Fail-safe storage?

A.To allow users to query data state from up to 90 days ago.
B.To provide a 7-day recovery period for catastrophic system failures.
C.To facilitate zero-copy cloning of large production databases.
D.To enable cross-region replication for high availability.
AnswerB

Fail-safe acts as a disaster recovery mechanism for critical system failures. If data is permanently lost beyond the reach of Time Travel, Snowflake Support can potentially recover data from the Fail-safe window. This 7-day window is mandatory, immutable, and ensures that data remains protected against unexpected infrastructure-level incidents.

Why this answer

Fail-safe is a critical component of Snowflake's data protection architecture, providing an immutable 7-day period that starts after the Time Travel window expires. It is intended for emergency recovery following system-level failures or catastrophic data loss. It is not designed for user-driven point-in-time recovery, which is the function of Time Travel, making Fail-safe a final, non-configurable safety mechanism for data durability.

Exam trap

Candidates confuse Fail-safe with Time Travel, mistakenly believing users can directly query or trigger data recovery from Fail-safe at any time.

210
MCQmedium

A data engineer needs to move a large volume of archived data from an on-premises system into a Snowflake internal stage and then load it into a permanent table. The data must be protected against accidental deletion for at least 30 days. The account is Snowflake Enterprise Edition. Which configuration best meets these requirements?

A.Create a transient table and set DATA_RETENTION_TIME_IN_DAYS to 30.
B.Create a permanent table and set DATA_RETENTION_TIME_IN_DAYS to 30.
C.Create a permanent table and rely on the default 1-day retention, since Fail-safe will cover the remaining 29 days.
D.Create a temporary table and set DATA_RETENTION_TIME_IN_DAYS to 30.
AnswerB

On Enterprise Edition, permanent tables support DATA_RETENTION_TIME_IN_DAYS up to 90, so 30 is valid and provides the required 30-day Time Travel window for recovery from accidental deletions or modifications. After Time Travel expires, the table also benefits from the 7-day Fail-safe period, adding further protection. This configuration directly satisfies the stated requirement.

Why this answer

A permanent table on Enterprise Edition can be configured with up to 90 days of Time Travel, so setting 30 days meets the protection requirement directly. Transient and temporary tables cap retention at 1 day, and relying on Fail-safe alone yields only a fixed 7-day window that requires Support intervention. Only the permanent table with 30-day retention satisfies the requirement.

Exam trap

The trap here is assuming Fail-safe can extend short Time Travel retention to reach 30 days; Fail-safe is a fixed 7-day layer that starts after Time Travel expires and cannot be configured or used self-service.

211
MCQmedium

When designing a clustering key for a table that is frequently joined with other tables, which strategy generally provides the best performance for the join operation?

A.Cluster on the most frequently used filter column in the WHERE clause.
B.Cluster on the column with the highest cardinality in the table.
C.Cluster on the column used as the join key.
D.Cluster on a column that is never updated or changed.
AnswerC

Clustering on join keys allows Snowflake to perform partition pruning during the join. If both tables in a join are clustered on their respective join keys, the optimizer can significantly reduce the amount of data read and processed, as it only needs to compare partitions with overlapping key ranges.

Why this answer

Clustering a table on the columns used in join predicates (the join keys) ensures that Snowflake can use join pruning and potentially more efficient join algorithms. When data is co-located within micro-partitions based on the join key, the engine can skip entire partitions that do not have matching keys in the other table, reducing I/O.

Exam trap

Candidates often choose clustering keys based on the primary key or date, regardless of query patterns. They overlook the importance of matching the clustering key to the join predicate.

212
MCQmedium

A data engineer needs to ingest files from an S3 bucket into Snowflake as soon as they are uploaded. The files arrive every few minutes and are generally smaller than 50MB. Which approach provides the most cost-effective and low-latency solution for this requirement?

A.Using a Task to run a COPY INTO statement every 5 minutes on a Small warehouse.
B.Executing a COPY INTO command via a Python script triggered by a cron job.
C.Configuring Snowpipe with auto-ingest enabled using SQS notifications.
D.Creating an External Table and using the REFRESH command every minute.
AnswerC

Snowpipe auto-ingest uses cloud messaging services like SQS to detect new files immediately upon arrival. This serverless feature charges based on the actual compute used for ingestion, making it ideal for frequent, small file arrivals where low latency is critical and managing a dedicated virtual warehouse would be expensive and inefficient.

Why this answer

Snowflake supports several methods for loading data, and choosing the right one depends on file size, frequency, and latency requirements. Snowpipe is specifically designed for continuous, automated loading of small files. This approach reduces manual overhead and ensures that data is available for analysis shortly after it is generated at the source, which is a core requirement for modern data engineering pipelines.

Exam trap

Candidates often suggest bulk loading (COPY INTO) for small, frequent files, failing to realize that this is inefficient and costly compared to the continuous nature of Snowpipe.

213
MCQmedium

A data engineer needs to categorize columns across multiple databases with custom business tags such as COST_CENTER and DATA_OWNER, and then enforce that only users with the TAG_ADMIN role can modify those tags. Which Snowflake feature should the engineer use to meet this requirement?

A.A masking policy that returns the tag value for authorized roles and NULL for others.
B.Object tagging with a tag created via CREATE TAG, assigning tags to columns with ALTER TABLE ... SET TAG, and granting the APPLY TAG privilege only to TAG_ADMIN.
C.Snowflake Data Classification, which automatically detects and tags columns with system tags.
D.Access control policies created with CREATE ACCESS POLICY and bound to the target columns.
AnswerB

Snowflake's native object tagging allows custom tags to be created with CREATE TAG, applied to columns, tables, and other objects, and governed through the APPLY TAG privilege on the tag. By granting APPLY TAG only to TAG_ADMIN, the engineer ensures only that role can assign or change the tag on objects. This directly satisfies both the categorization and the access-control requirements using a single governance feature.

Why this answer

Object tagging is Snowflake's mechanism for attaching custom metadata labels to columns and other objects. Tags are created with CREATE TAG, applied with ALTER TABLE ... SET TAG, and their modification is governed by the APPLY TAG privilege on the tag itself.

Granting APPLY TAG only to TAG_ADMIN restricts who can change the tags, satisfying both categorization and access-control needs.

Exam trap

The trap here is conflating Data Classification's system tags with custom business tags, when only object tagging supports user-defined tags and the APPLY TAG privilege model.

214
MCQmedium

A retail company has a Snowflake account with many databases and schemas. The data governance team needs to discover all columns that contain personal data such as names, email addresses, and phone numbers, and automatically assign a system tag so that a masking policy can be applied later. They want to minimize manual effort and ensure the classification is consistent. Which Snowflake feature should they use to achieve this?

A.Manually run SHOW COLUMNS in each database and schema, then apply tags using ALTER TABLE ... SET TAG.
B.Use Snowflake Data Classification to automatically scan and tag columns with system tags like SNOWFLAKE.CORE.PRIVACY_CATEGORY.
C.Enable Access History and then use the ACCESS_HISTORY view to identify columns containing personal data.
D.Create a stored procedure that queries INFORMATION_SCHEMA.COLUMNS and uses pattern matching to assign tags.
AnswerB

Snowflake Data Classification automatically scans tables and views, identifies sensitive data using native and custom classifiers, and assigns system tags such as SNOWFLAKE.CORE.PRIVACY_CATEGORY. This directly addresses the need to discover and tag personal data across many databases with minimal manual effort. The system tags can then be used to drive masking policies, making this the correct approach.

Why this answer

Snowflake Data Classification is designed to automatically scan and classify data, applying system tags that indicate privacy categories. This reduces manual effort and ensures consistent tagging across the account. The other options either require manual work, rely on incomplete methods, or use auditing features that do not detect sensitive data content.

Thus, Data Classification is the correct choice.

Exam trap

The trap here is confusing auditing views like ACCESS_HISTORY with data classification capabilities, assuming that access patterns reveal sensitive data.

215
MCQeasy

A data engineer is configuring continuous ingestion of new event files from an external Amazon S3 stage into a Snowflake table. The files arrive frequently and the engineer wants Snowflake to load them automatically without building an external orchestrator. The stage already has a storage integration attached. Which Snowflake object should the engineer create to accomplish this?

A.A stream on the external stage that captures new file names
B.A pipe with AUTO_INGEST = TRUE
C.A materialized view defined over the external stage
D.A task scheduled with a CRON expression that runs COPY INTO every minute
AnswerB

A pipe with AUTO_INGEST = TRUE relies on the cloud provider's event notifications to trigger COPY INTO when new files land on the stage, so ingestion happens automatically with no external scheduler required. The storage integration supplies the credentials and the event notification ARN is tied to the pipe, which matches the requirement of loading frequent event files with minimal orchestration overhead on the Snowflake side.

Why this answer

Continuous, event-driven loading from an external stage is implemented with a pipe configured for auto-ingest. The pipe wraps the COPY INTO statement, and the cloud provider's event notification tells Snowflake when new files appear, so no polling or external scheduler is needed. Streams, tasks, and materialized views solve different problems and cannot react to S3 object creation events.

Exam trap

The trap here is assuming any scheduled COPY INTO satisfies 'automatic' loading, when event-driven auto-ingest is the specific mechanism for reacting to new files.

216
MCQeasy

A data engineer needs to ensure that a column containing credit card numbers is masked for all users except those with the PAYMENT_ADMIN role. The masking should be applied consistently across all tables that use a specific tag. Which Snowflake feature should the engineer use?

A.A row access policy that filters rows based on the user's role.
B.A standard masking policy attached directly to each column containing credit card numbers.
C.A secure view that excludes the credit card column for non-admin users.
D.A tag-based masking policy that is associated with a tag and automatically applies to all columns with that tag.
AnswerD

Tag-based masking policies allow you to associate a masking policy with a tag. When the tag is applied to a column, the masking policy is automatically enforced. This ensures consistent protection across all tables that use the tag, and new columns tagged later are automatically covered. It meets the requirement for consistent masking based on a tag.

Why this answer

Tag-based masking policies associate a masking policy with a tag, so that any column assigned that tag automatically inherits the masking behavior. This provides consistent, scalable protection across all tables, including future columns. It eliminates the need to manually attach policies to each column, ensuring that credit card numbers are masked for unauthorized users.

Exam trap

The trap here is choosing manual column attachment or secure views when the requirement specifies consistency across all tables using a tag, which is exactly what tag-based masking provides.

217
MCQeasy

A data engineer is reviewing storage costs in a Snowflake account. The engineer notices that a permanent table named CUSTOMER_DIM has a DATA_RETENTION_TIME_IN_DAYS value of 90, but the account is on Standard Edition. The engineer wants to confirm whether this is valid. What is the maximum Time Travel retention period for a permanent table in a Standard Edition account?

A.1 day
B.90 days
C.0 days
D.7 days
AnswerA

Standard Edition supports a maximum Time Travel retention of 1 day for permanent tables. The default is 1 day, and it can be set to 0 to disable Time Travel. Values above 1 day, such as 90, require Enterprise Edition or higher. This is why a 90-day setting is invalid on Standard Edition and must be corrected or the account upgraded.

Why this answer

On Standard Edition, permanent tables support a maximum Time Travel retention of 1 day, with 0 disabling Time Travel entirely. Longer retention periods such as 7 or 90 days require Enterprise Edition or higher. A 90-day setting in a Standard Edition account is therefore invalid, and the engineer should expect the maximum to be 1 day.

Exam trap

The trap here is conflating Fail-safe's fixed 7-day period with the Time Travel maximum, when Standard Edition Time Travel is capped at 1 day.

218
MCQhard

What is the primary benefit of using a file format object in Snowflake when dealing with multiple stages and load jobs?

A.It automatically compresses data before it is uploaded to the cloud.
B.It centralizes file configuration to ensure consistency across multiple load jobs.
C.It encrypts the data at rest in the stage before loading.
D.It stores the credentials for the external stages for easier access.
AnswerB

Centralizing file format settings allows for consistent data ingestion behavior across all pipelines. If a delimiter or format requirement changes, updating the single object applies the change globally, which prevents bugs and inconsistencies that would occur if each COPY command had its own, potentially divergent, file format parameter definitions.

Why this answer

File format objects provide a centralized, reusable definition of file settings (like delimiter, compression, or error handling). By referencing a single object in multiple COPY commands, an engineer ensures consistency across the entire data pipeline. This eliminates drift and makes it easy to update the configuration for all load jobs at once, reducing maintenance and preventing errors associated with manually defining parameters repeatedly across many different SQL statements.

Exam trap

Candidates often think file formats improve load performance or data compression. While they organize settings, their primary architectural benefit is consistency and reducing configuration drift across multiple jobs.

219
Multi-Selecthard

A data engineer is tasked with implementing a data governance strategy that includes classifying sensitive data and applying tags. The engineer plans to use Snowflake's Data Classification and tag-based masking. Which two statements are true regarding the interaction between Data Classification and tags? (Choose two.)

Select 2 answers
A.Tag-based masking policies cannot be applied to system tags; only user-defined tags support masking.
B.Data Classification can only tag columns with user-defined tags, not system tags.
C.Data Classification requires that all tags be manually created before classification can run.
D.Tag-based masking policies can be applied to system tags created by Data Classification.
E.Data Classification automatically assigns system tags to columns based on the classification results.
AnswersD, E

Snowflake allows masking policies to be attached to system tags, including those created by Data Classification. This enables automatic masking of columns that are classified as sensitive, such as those tagged with SEMANTIC_CATEGORY = 'PII'. The masking policy is then enforced whenever the tag is present on a column.

Why this answer

Data Classification automatically assigns system tags to columns based on its analysis, and these system tags can have masking policies attached to them. This integration allows for automatic masking of sensitive data identified by classification. Manual tag creation is not required, and system tags are indeed used and can support masking.

Exam trap

The trap here is assuming that system tags cannot have masking policies or that Data Classification requires manual tags, when in fact system tags are central and support masking.

220
MCQhard

A data engineer is implementing row access policies to enforce data segregation for a multi-tenant application. The table ORDERS contains a column TENANT_ID. The engineer creates a row access policy that uses a mapping table TENANT_MAPPING to associate users with their allowed TENANT_ID values. After applying the policy, the engineer notices that queries against ORDERS are returning no rows for some users who should have access. The mapping table is correctly populated. What is the most likely cause of the issue?

A.The row access policy is defined with a subquery that returns multiple rows for a given user, causing the policy to evaluate to false.
B.The row access policy uses a mapping table that is not qualified with the database and schema, and the user's session does not have the correct current database and schema set.
C.The row access policy uses CURRENT_USER() to filter, but the mapping table maps roles to tenants, not users.
D.The row access policy is defined with a subquery that references the mapping table, but the policy owner does not have the necessary privileges to access the mapping table.
AnswerB

If the policy references the mapping table without fully qualifying it (e.g., using just TENANT_MAPPING instead of DB.SCHEMA.TENANT_MAPPING), the resolution depends on the session's current database and schema. Users with different session contexts might resolve the table incorrectly, leading to no matching rows. This is a common pitfall. Fully qualifying objects in policies ensures consistent behavior regardless of session settings, which is why this is the most likely cause.

Why this answer

Row access policies that reference other tables must use fully qualified names to avoid dependency on session context. If the mapping table is not fully qualified, users with different current database or schema settings may not find the table or may resolve to a different table, resulting in no rows. Fully qualifying the table name ensures that the policy behaves consistently for all users.

Exam trap

The trap here is overlooking session context dependency in policy definitions, assuming that unqualified object references will always resolve correctly.

221
MCQhard

A data engineer manages a Snowflake account with a database named PROD_DB. The database contains a schema SALES with a table ORDERS. The engineer wants to clone the entire PROD_DB database to a new database named DEV_DB for testing. The PROD_DB database is large, but the engineer needs the clone to be available immediately. Which statement accurately describes the storage consumption and availability of the cloned database?

A.The clone is not available immediately; it must complete a background copy process before it can be queried.
B.The clone shares storage with the source, and any changes to the source will also affect the clone, consuming additional storage in both databases.
C.The clone consumes no additional storage initially, and data changes in DEV_DB will consume additional storage only for the changed micro-partitions.
D.The clone consumes storage equal to the size of the source database because it copies all data physically.
AnswerC

Zero-copy cloning creates a new database that shares the same micro-partitions as the source. Initially, no additional storage is consumed. When data in the clone is modified, new micro-partitions are created for the changes, and storage is charged for those new partitions. The original micro-partitions remain shared until they are no longer referenced by either database. This makes the clone instantly available with minimal storage overhead.

Why this answer

Zero-copy cloning creates a new database that shares the original micro-partitions without duplicating data. The clone is immediately available and consumes no additional storage at creation. Subsequent changes in either the source or the clone create new micro-partitions, and storage is billed only for those new partitions.

This approach is efficient for creating development or testing environments.

Exam trap

The trap here is believing that cloning physically copies data or that changes in one database affect the other, when in fact they are independent after the clone.

222
MCQmedium

A data engineer needs to load data from an Azure Blob storage container into Snowflake. The organization requires a secure connection that does not use public endpoints. What should the engineer configure?

A.Configure an Azure Service Bus to relay the data to Snowflake.
B.Create a storage integration using an Azure AD service principal and Private Link.
C.Use a public URL for the stage but enable IP whitelisting.
D.Use an external stage with a SAS token that has a long expiration time.
AnswerB

Storage integrations are the secure way to access cloud storage without hardcoding credentials. When combined with Azure Private Link, they establish a dedicated, private connection that ensures data movement stays within the cloud provider's backbone, satisfying security requirements by removing reliance on public internet traffic for data transfers.

Why this answer

Using Azure Private Link with a Snowflake storage integration is the recommended method for secure, private data movement. This architecture ensures that traffic between Azure and Snowflake stays on the private network, bypassing the public internet and meeting strict compliance requirements for enterprise security. This question highlights the importance of cloud networking fundamentals in the context of data engineering and secure cloud-to-cloud integrations.

Exam trap

Candidates often suggest public endpoints or simple credentials. They miss the requirement for a 'storage integration' combined with 'Private Link' to strictly avoid the public internet as requested.

223
MCQmedium

A data engineer is managing a Snowflake account where a transient table named STG_ORDERS is created in a schema. The table holds intermediate ETL results. The engineer wants to ensure that if the table is accidentally dropped, it can be recovered within 24 hours without incurring Fail-safe storage costs. What should the engineer do?

A.Create a zero-copy clone of the transient table and set DATA_RETENTION_TIME_IN_DAYS to 1 on the clone.
B.Set DATA_RETENTION_TIME_IN_DAYS to 0 on the transient table and rely on Fail-safe for recovery.
C.Convert the table to a permanent table and set DATA_RETENTION_TIME_IN_DAYS to 1.
D.Set DATA_RETENTION_TIME_IN_DAYS to 1 on the transient table.
AnswerD

Transient tables support Time Travel with a maximum retention of 1 day. Setting DATA_RETENTION_TIME_IN_DAYS to 1 enables recovery within 24 hours and, because transient tables have no Fail-safe period, no additional storage costs are incurred after the retention period expires. This directly meets the requirement.

Why this answer

Transient tables support Time Travel up to 1 day and have no Fail-safe period, so setting DATA_RETENTION_TIME_IN_DAYS to 1 provides 24-hour recovery without Fail-safe costs. Permanent tables have a mandatory 7-day Fail-safe period, which would incur costs. Disabling Time Travel eliminates recovery, and cloning does not address recovery of the original table.

Exam trap

The trap here is assuming that transient tables can use Fail-safe for recovery or that they support longer Time Travel retention than 1 day.

224
MCQmedium

A data engineer is tuning a query that joins two large tables. The query is performing a 'Remote Disk Spilling' operation. Which optimization strategy is most effective to resolve this?

A.Increase the multi-cluster warehouse scaling policy to 'Maximized'.
B.Enable Result Cache by setting USE_CACHED_RESULT to TRUE.
C.Scale up the warehouse to a larger size.
D.Implement a materialized view on the joined columns.
AnswerC

Increasing the warehouse size provides more memory per node. Since a single query can only execute within the memory limits of the nodes assigned to it, a larger warehouse provides the necessary resources to hold intermediate join states in RAM, effectively eliminating the need to spill to remote storage.

Why this answer

Remote disk spilling occurs when the memory allocated to the virtual warehouse is insufficient to hold the intermediate result sets of a join or aggregation. By increasing the size of the warehouse, the memory available per node doubles, allowing larger datasets to be processed entirely in-memory. This significantly reduces latency associated with I/O operations and speeds up complex join operations that frequently cause spilling in standard configurations.

Exam trap

Candidates often suggest rewriting the query or adding indexes, but Snowflake does not use traditional indexes; scaling up the warehouse is the standard solution to provide more memory for joins.

225
MCQmedium

Which approach is most efficient for transforming a large volume of data in Snowflake when the logic requires complex window functions and stateful processing?

A.Using a Python script to fetch data, process locally, and upload.
B.Using a single Stored Procedure with row-by-row cursor processing.
C.Using set-based SQL transformations in a materialized view or dynamic table.
D.Using a User-Defined Function (UDF) for every column transformation.
AnswerC

Set-based transformations leverage Snowflake's query optimizer to execute complex logic in parallel across the cluster. This is the foundation of efficient ELT, as it pushes the transformation logic down to the data rather than moving data to the logic, maximizing performance and minimizing latency.

Why this answer

For large-scale, complex transformations, using SQL within a View, Dynamic Table, or a CTAS (Create Table As Select) operation is highly efficient because it runs directly on the Snowflake compute engine. Snowflake's query optimizer is highly tuned for window functions and complex joins, allowing it to distribute these operations across all nodes in the warehouse, providing superior performance compared to row-by-row procedural processing.

Exam trap

Candidates often try to use procedural code or UDFs for set-based operations. They overlook that native SQL set-based logic is inherently more optimized for distributed processing in Snowflake.

Page 2

Page 3 of 4

Page 4

All pages