DEA-C02 — Snowflake SnowPro Advanced: Data Engineer Cheat Sheet
Compact DEA-C02 Cheat sheet for Snowflake data engineering patterns, pipelines, performance, security, and operations.
Use the tables for a quick pre-exam check. Expand a topic’s notes for explanations, examples, and additional distinctions.
Scope and study context
- Which Snowflake feature fits a scenario.
- How ingestion, CDC, and orchestration components interact.
- High-yield SQL patterns and common traps.
- Performance and reliability signals to check during troubleshooting.
The real exam rewards practical Snowflake judgment: choosing the right ingestion pattern, designing reliable pipelines, optimizing cost and performance, handling semi-structured data, and applying security/governance controls without overengineering.
Core Snowflake Architecture Map
| Layer / Concept | What It Does | Data Engineer Exam Relevance |
|---|---|---|
| Cloud services layer | Authentication, metadata, optimizer, access control, transactions | Explains metadata pruning, query compilation, RBAC, Time Travel metadata, and object management |
| Storage layer | Compressed columnar data in immutable micro-partitions | Drives pruning, clustering, cloning, Time Travel, and storage design |
| Virtual warehouses | User-managed compute for SQL, loading, transformations, Snowpark | Tune size for query complexity; scale out for concurrency |
| Serverless compute | Snowflake-managed compute for selected services | Used by features such as Snowpipe, automatic services, and some task/service patterns |
| Micro-partitions | Internal storage units with metadata such as ranges and distinct values | Enables pruning; clustering can improve pruning for large tables |
| Metadata | File load history, table statistics, object definitions, access metadata | Used for idempotent loads, query optimization, auditing, and troubleshooting |
| Result cache | Reuses prior query result when eligible | Useful but should not be treated as a pipeline correctness mechanism |
| Warehouse cache | Local data cache on a running warehouse | Can improve repeated scans; lost when warehouse suspends or changes depending on execution context |
Notes and examples
Storage, compute, and services
| Layer | What it does | Exam-relevant point |
|---|---|---|
| Storage | Stores table data in compressed micro-partitions | Storage is independent of warehouses |
| Virtual warehouses | Execute queries, loads, transformations, and many refresh operations | Size affects single-query resources; clusters affect concurrency |
| Cloud services | Optimization, metadata, authentication, access control, result cache, coordination | Some operations can use metadata or cached results without scanning data |
Key implications:
- A suspended warehouse does not delete data.
- Scaling compute does not physically repartition existing data.
- Multiple warehouses can query the same data independently.
- Credits are driven by compute/service usage, not simply data volume.
- Query performance is often about pruning, SQL shape, and spill avoidance, not only warehouse size.
Micro-partitions and pruning
Snowflake stores table data in immutable micro-partitions with metadata such as value ranges and statistics. Query pruning skips micro-partitions that cannot match the filter.
High-yield points:
- Good pruning depends on data organization and filter predicates.
- Load order can create natural clustering.
- Repeated filtering by date, tenant, region, or business key can make clustering valuable on very large tables.
- Small tables rarely need clustering.
- Highly volatile tables can make clustering maintenance expensive.
- Expressions used in predicates may reduce pruning if they obscure the stored column values.
Feature Selection Matrix
| Need | Prefer | Avoid / Watch For |
|---|---|---|
| Batch load staged files | COPY INTO <table> | Do not build custom loaders unless you need special processing outside Snowflake |
| Continuous file ingestion | Snowpipe | Snowpipe is not the same as transactional streaming; design for notification and ingestion latency |
| Low-latency row ingestion | Snowpipe Streaming or connector-based streaming pattern | Do not force tiny files through batch COPY if continuous row ingestion is required |
| Declarative refresh of derived tables | Dynamic tables | Not ideal for procedural branching, complex side effects, or custom retry logic |
| Incremental CDC from Snowflake table changes | Streams + tasks | Streams are offsets over change data, not physical event queues |
| Scheduled SQL orchestration | Tasks | Remember task graphs need resumed tasks and dependency design |
| Procedural orchestration in Snowflake | Stored procedures called by tasks | Avoid putting simple set-based SQL into procedural loops |
| Python/Java/Scala transformation pushed to Snowflake | Snowpark | Watch for code that pulls large data to the client instead of pushing down |
| Point lookup acceleration | Search Optimization Service | Do not use as a default substitute for good table design |
| Repeated expensive aggregate/query pattern | Materialized view, dynamic table, or precomputed table | Confirm freshness and maintenance tradeoffs |
| Scan-heavy outlier queries | Query Acceleration Service where eligible | Not a fix for bad joins, poor filters, or under-sized architecture |
| Cross-region/cloud DR | Replication / failover groups where supported | Do not confuse Time Travel with disaster recovery |
| Share data without copying | Secure Data Sharing | Secure views/policies may be needed to restrict exposed rows/columns |
Data Loading and Ingestion
Loading Pattern Decision Table
| Pattern | Best For | Key Objects | Exam Traps |
|---|---|---|---|
| Manual or scheduled batch load | Periodic files, controlled windows | Stage, file format, COPY INTO | COPY load metadata prevents duplicate file loads unless forced; understand ON_ERROR behavior |
| Snowpipe auto-ingest | Event-driven files from cloud storage | External stage, pipe, cloud notification integration | It is continuous ingestion, not instant transformation orchestration |
| Snowpipe REST API | Application-triggered file ingest | Pipe, REST call | Application still stages files; not row-by-row streaming |
| Snowpipe Streaming | Low-latency streaming rows | SDK/connector/channel pattern | Different mental model from staged-file COPY |
| External tables | Query data in external storage | External stage, external table, metadata refresh | Querying external data is not the same as loading into Snowflake-managed storage |
| Iceberg tables | Open table format / lakehouse interoperability | Catalog integration, external volume, Iceberg table | Understand ownership of metadata and storage before choosing |
| Connector ingestion | SaaS/app/system ingestion | Snowflake connectors or partner tools | Focus on governance, idempotency, and operational monitoring |
Notes and examples
Stage and File Format Reference
| Object / Option | Purpose | Practical Notes |
|---|---|---|
| Internal stage | Snowflake-managed file staging | Good for controlled uploads and transient staging |
| External stage | Cloud object storage location | Prefer storage integrations over embedded cloud credentials |
| Named file format | Reusable parsing definition | Keeps COPY statements consistent and auditable |
PATTERN | Regex filter for staged files | Useful but easy to overcomplicate; test carefully |
FILES | Explicit list of files | Good for deterministic loads |
VALIDATION_MODE | Validate load without committing rows | Useful before production loads |
ON_ERROR | Controls behavior for bad rows/files | CONTINUE can hide data quality issues if not monitored |
MATCH_BY_COLUMN_NAME | Map columns by name where supported | Useful when file column order changes |
| Metadata columns | Capture filename, row number, timestamps | Use for lineage, replay, and quarantine workflows |
High-Yield COPY INTO Pattern
CREATE OR REPLACE FILE FORMAT ff_json
TYPE = JSON
STRIP_OUTER_ARRAY = TRUE;
COPY INTO raw.events
(payload, source_file, loaded_at)
FROM (
SELECT
$1,
METADATA$FILENAME,
CURRENT_TIMESTAMP()
FROM @raw_event_stage
)
FILE_FORMAT = (FORMAT_NAME = ff_json)
ON_ERROR = 'CONTINUE';
Key points:
- Use named stages and file formats for repeatability.
- Persist source file metadata for lineage and replay.
- Monitor rejected rows/files;
ON_ERROR = 'CONTINUE'is not a data quality solution by itself. COPYmaintains load metadata, so reloading the same file requires intentional design.
Snowpipe Reference
CREATE OR REPLACE PIPE ingest.event_pipe
AUTO_INGEST = TRUE
AS
COPY INTO raw.events
FROM @raw_event_stage
FILE_FORMAT = (FORMAT_NAME = ff_json);
| Topic | Remember |
|---|---|
| Auto-ingest | Uses cloud notifications to trigger ingestion from a stage |
| Pipe definition | Contains a COPY INTO statement |
| Monitoring | Use pipe history and copy history views/functions |
| Transformations | Keep pipe transformations simple; use downstream tasks/dynamic tables for complex logic |
| Idempotency | File naming, load metadata, and replay procedure matter |
| Errors | Check pipe status and load history; failed file handling must be operationalized |
Stages
| Stage type | Use case | Notes |
|---|---|---|
| User stage | Personal/ad hoc loading | Tied to a user |
| Table stage | Simple table-specific staging | Convenient, less reusable |
| Named internal stage | Reusable Snowflake-managed staging | Good for controlled internal loads |
| External stage | Data in cloud object storage | Usually paired with storage integration |
| Directory table | File metadata visibility for staged files | Useful for tracking files and discovery |
Strong data engineering designs usually use named stages, clear file formats, and storage integrations rather than embedded credentials.
COPY INTO for bulk load
Use COPY INTO <table> when files already exist in a stage and you need controlled batch loading.
Review these options/concepts:
| Concept | Why it matters |
|---|---|
| File format | Defines CSV, JSON, Parquet, Avro, ORC, compression, delimiters, null handling, headers |
ON_ERROR | Controls behavior for bad rows/files |
VALIDATION_MODE | Tests load errors before committing data |
MATCH_BY_COLUMN_NAME | Helps load files where column order differs |
PATTERN | Filters staged files by name pattern |
FORCE | Can reload files that Snowflake otherwise recognizes as already loaded |
| Load history | Helps prevent duplicate file loads |
| Transforming from stage | Allows simple column selection/casts during load |
Common traps:
- Bad CSV options often appear as column shifts, unexpected nulls, or row parse errors.
COPY INTOtracks loaded files; duplicate file names and forced reloads are exam-relevant.COPY INTO <location>is for unloading data to a stage, not loading into a table.- Semi-structured formats may load into
VARIANTor be mapped into relational columns depending on design.
Snowpipe
Use Snowpipe for continuous file ingestion when new files land in cloud storage or a stage.
| Snowpipe point | Review |
|---|---|
| Ingestion style | File-based, continuous, serverless ingestion |
| Triggering | Cloud event auto-ingest or REST API notification |
| Best fit | Frequent small-to-medium file arrivals |
| Not ideal for | Heavy transformation, large historical reloads, complex orchestration |
| Duplicate prevention | Depends on file load metadata and careful file naming/loading design |
Candidate trap: Snowpipe is not the same as Snowpipe Streaming. Snowpipe loads files; Snowpipe Streaming ingests rows through a streaming API pattern.
Snowpipe Streaming
Use Snowpipe Streaming when applications need to send rows directly with lower latency and without first writing files to cloud storage.
Good fit:
- Event or application data.
- Lower-latency ingestion.
- Avoiding file staging as the primary transport.
Review risk:
- You still need downstream modeling, deduplication, monitoring, and error handling.
- It does not automatically replace transformation pipelines.
Transformation and Orchestration
Streams, Tasks, and Dynamic Tables
| Feature | Use When | Core Concept | Common Trap |
|---|---|---|---|
| Stream | Need change data from table/view changes | Tracks offset of changes since last consumption | A stream is not a standalone queue; it depends on source data retention and consumption |
| Standard stream | Need inserts, deletes, updates | Updates appear with change metadata | Must handle delete/update semantics correctly |
| Append-only stream | Only new inserts matter | More efficient insert-only change tracking | Wrong choice if updates/deletes must be captured |
| Task | Need scheduled or event-like SQL execution | Runs SQL, stored procedure, or graph step | Tasks must be resumed; child tasks depend on graph state |
| Task graph | Need ordered multi-step pipeline | Root task plus child dependencies | Design for retries, failure isolation, and idempotency |
| Dynamic table | Need declarative refreshed result table | Snowflake refreshes toward target lag | Not a replacement for every task/procedure workflow |
| Stored procedure | Need procedural control flow | JavaScript, Snowpark Python/Java/Scala, SQL procedures | Avoid row-by-row procedural processing for set operations |
Notes and examples
Stream Metadata
| Metadata Column | Meaning | Use |
|---|---|---|
METADATA$ACTION | Insert or delete action | Drive MERGE, deletes, audit logic |
METADATA$ISUPDATE | Whether row is part of an update operation | Distinguish update pairs from simple insert/delete behavior |
METADATA$ROW_ID | Stable row identifier for change tracking | Useful for dedup/change handling patterns |
Task and Stream Pattern
CREATE OR REPLACE STREAM stg.orders_stream
ON TABLE stg.orders;
CREATE OR REPLACE TASK mart.merge_orders_task
WAREHOUSE = etl_wh
SCHEDULE = 'USING CRON 0 * * * * UTC'
WHEN SYSTEM$STREAM_HAS_DATA('stg.orders_stream')
AS
MERGE INTO mart.orders AS t
USING (
SELECT *
FROM stg.orders_stream
WHERE METADATA$ACTION = 'INSERT'
) AS s
ON t.order_id = s.order_id
WHEN MATCHED THEN UPDATE SET
t.status = s.status,
t.updated_at = s.updated_at
WHEN NOT MATCHED THEN INSERT
(order_id, status, updated_at)
VALUES
(s.order_id, s.status, s.updated_at);
ALTER TASK mart.merge_orders_task RESUME;
Exam reminders:
- Consuming a stream occurs when the DML statement using it commits.
- Wrap multi-step stream consumption in a transaction when consistency matters.
SYSTEM$STREAM_HAS_DATAis useful as a taskWHENcondition, but the downstream SQL still needs to be idempotent.- Separate ingestion, validation, merge, and serving layers when troubleshooting clarity matters.
Dynamic Table Pattern
CREATE OR REPLACE DYNAMIC TABLE mart.daily_sales
TARGET_LAG = '1 hour'
WAREHOUSE = etl_wh
AS
SELECT
order_date,
SUM(net_amount) AS net_sales,
COUNT(*) AS order_count
FROM clean.orders
GROUP BY order_date;
| Dynamic Table Choice | Choose It When |
|---|---|
TARGET_LAG | You need Snowflake-managed refresh toward a freshness objective |
TARGET_LAG = DOWNSTREAM | Refresh should be driven by downstream dependencies |
| Incremental refresh | Query is eligible and incremental maintenance is efficient |
| Full refresh | Logic is not incrementally maintainable or full recompute is acceptable |
| Tasks instead | You need procedural steps, conditional branches, external calls, or custom retry logic |
Dynamic tables
Dynamic tables define target tables as SQL queries and let Snowflake refresh them to meet a target lag.
When dynamic tables are a strong answer
| Scenario | Why dynamic tables fit |
|---|---|
| Declarative transformation chain | SQL defines desired result |
| Incremental refresh is acceptable | Snowflake manages refresh behavior |
| Replacing simple streams/tasks DAGs | Less procedural orchestration |
| Data mart refresh from raw/curated layers | Clear dependency-based design |
When dynamic tables are weaker
| Scenario | Better option |
|---|---|
| Complex procedural workflow | Tasks and stored procedures |
| External API calls or custom code | Snowpark, procedures, external functions, orchestration |
| File ingestion | COPY INTO, Snowpipe, or Snowpipe Streaming |
| Manual transaction control | Streams/tasks or explicit SQL logic |
| Immediate real-time requirement | Streaming plus fit-for-purpose downstream design |
Candidate trap: Dynamic tables simplify transformation refresh; they do not replace every orchestration, ingestion, or procedural requirement.
Table Design and Storage
Table Type Reference
| Table Type | Best For | Key Behavior |
|---|---|---|
| Permanent table | Durable production data | Supports Snowflake data protection features such as Time Travel and Fail-safe behavior |
| Transient table | Rebuildable data, staging, derived data | No Fail-safe; useful when recovery requirements are lower |
| Temporary table | Session-scoped intermediate work | Exists only for the session; can shadow permanent object names in the session |
| External table | Query files in external storage | Metadata must reflect external file changes |
| Dynamic table | Managed refreshed table from a query | Stores derived results maintained by Snowflake |
| Iceberg table | Open table format interoperability | Requires understanding catalog/storage ownership |
Notes and examples
Micro-Partition and Clustering Reference
| Concept | Practical Meaning |
|---|---|
| Micro-partition | Immutable internal storage unit; Snowflake stores metadata for pruning |
| Pruning | Skips micro-partitions that cannot satisfy query predicates |
| Natural clustering | Data order created by load patterns may already support pruning |
| Clustering key | Expression list used to improve organization for pruning |
| Clustering depth | Indicator of how well data is clustered for selected keys |
| Automatic Clustering | Snowflake-managed maintenance for defined clustering keys |
| Re-clustering cost | More clustering is not always better; use for large tables with selective filters |
Choose clustering when:
- Table is large enough that pruning matters.
- Queries repeatedly filter on predictable columns.
- Natural load order does not already cluster data well.
- Maintenance cost is justified by query improvement.
Avoid clustering when:
- Table is small.
- Filters are unpredictable.
- High-churn DML causes excessive maintenance.
- Query bottleneck is joins, spilling, or concurrency rather than scan pruning.
Optimization Feature Comparison
| Feature | Helps With | Not For |
|---|---|---|
| Clustering key | Range/filter pruning on large tables | Small tables or random access workloads alone |
| Search Optimization Service | Highly selective point lookups, some semi-structured search patterns | Broad scans and general warehouse sizing problems |
| Materialized view | Repeated expensive query patterns with maintained results | Arbitrary complex transformations or every dashboard query |
| Dynamic table | Fresh, declarative derived table pipeline | Procedural orchestration |
| Query Acceleration Service | Eligible scan-heavy queries with selective processing | Bad SQL logic, missing joins, or universal acceleration |
| Warehouse scale-up | Complex single queries, memory pressure, large joins | High concurrency alone |
| Multi-cluster warehouse | Concurrent user/query demand | Making one individual query faster |
| Result cache | Repeated identical eligible queries | ETL correctness, freshness guarantees, or parameterized workload design |
Semi-Structured Data
Data Types and Functions
| Item | Use |
|---|---|
VARIANT | Store semi-structured values such as JSON |
OBJECT | Key-value structure |
ARRAY | Ordered list |
PARSE_JSON | Convert JSON text to VARIANT |
TO_VARIANT | Convert SQL value to VARIANT |
FLATTEN | Explode arrays/objects into rows |
| Dot / bracket notation | Navigate nested values |
Casts such as ::STRING, ::NUMBER | Convert variant values for typed processing |
SELECT
payload:customer.id::STRING AS customer_id,
item.value:sku::STRING AS sku,
item.value:quantity::NUMBER AS quantity
FROM raw.events,
LATERAL FLATTEN(input => payload:items) AS item;
High-yield distinctions:
- JSON
nulland SQLNULLare not always equivalent in processing. - Cast extracted values before joining, grouping, or applying numeric logic.
- Flatten only the level required; excessive flattening can explode row counts.
- For frequently queried attributes, consider projecting into typed columns or derived tables.
Notes and examples
Semi-structured data
Snowflake commonly stores semi-structured data in VARIANT, OBJECT, and ARRAY.
Core functions and access patterns
| Need | Snowflake concept |
|---|---|
| Parse JSON text into semi-structured value | PARSE_JSON or TRY_PARSE_JSON |
| Store flexible nested data | VARIANT |
| Navigate object fields | Colon, dot, or bracket notation |
| Expand arrays/objects into rows | FLATTEN with LATERAL |
| Preserve rows when no nested element exists | OUTER => TRUE with FLATTEN |
| Recursive expansion | RECURSIVE => TRUE |
| Test data type | IS_OBJECT, IS_ARRAY, TYPEOF, related checks |
Important distinction:
PARSE_JSON('{"a":1}')creates a semi-structured object.- Treating JSON text as a plain string does not make it queryable as JSON.
Semi-structured traps
- Forgetting
LATERALwhen flattening a column from the left table. - Multiplying rows unexpectedly when flattening multiple arrays.
- Assuming all records have the same JSON shape.
- Casting too early and failing on malformed values; use tolerant functions where needed.
- Ignoring case sensitivity and path syntax.
- Using
SELECT *after flattening and creating confusing duplicate columns.
Practical pattern
- Land raw data with metadata columns such as source file, load timestamp, and batch ID.
- Store the original payload when traceability matters.
- Parse and validate into curated relational columns.
- Use
FLATTENfor repeated nested structures. - Deduplicate and merge into target tables with stable business keys.
Snowpark, UDFs, and Stored Procedures
| Tool | Best Use | Exam Distinction |
|---|---|---|
| Snowpark DataFrame API | Pushdown transformations in Python, Java, or Scala | Lazy execution; operations are planned for Snowflake execution |
| Scalar UDF | Reusable row-level function | Good for deterministic expressions, not orchestration |
| UDTF | Function returning rows/table output | Useful for expanding or parsing custom structures |
| Stored procedure | Control flow, orchestration, multi-step logic | Can be called from tasks |
| External function | Call external service through configured integration | Requires security/network design |
| External access integration | Allows governed outbound access from supported code | Do not hard-code secrets or network assumptions |
| Packages/imports | Bring dependencies into Snowpark code | Versioning and allowed packages matter operationally |
Notes and examples
Practical design rules:
- Prefer SQL set operations for relational transformations.
- Use Snowpark when code libraries, complex logic, or developer language preference justify it.
- Keep large datasets inside Snowflake; avoid collecting data to the client.
- Use stored procedures for orchestration, not as a substitute for set-based SQL performance.
Security, Governance, and Data Protection
RBAC and Grants
| Concept | Meaning | Exam Focus |
|---|---|---|
| Role-based access control | Privileges granted to roles, roles granted to users/roles | Design least-privilege access |
USAGE privilege | Allows use of database, schema, warehouse, integration | Required but not sufficient for object access |
| Object privileges | SELECT, INSERT, UPDATE, DELETE, etc. | Grant only what the pipeline needs |
OWNERSHIP | Full control over object and grant management | Transferring ownership can affect grants |
| Future grants | Apply grants to future objects in a schema/database | Useful for repeatable pipeline object creation |
| Managed access schema | Centralizes grant management through schema owner | Good for controlled environments |
| Secondary roles | Additional active roles for a session | Know how effective privileges are determined |
Notes and examples
Example least-privilege pattern:
GRANT USAGE ON WAREHOUSE etl_wh TO ROLE data_engineer_role;
GRANT USAGE ON DATABASE analytics TO ROLE data_engineer_role;
GRANT USAGE ON SCHEMA analytics.stg TO ROLE data_engineer_role;
GRANT SELECT, INSERT, UPDATE, DELETE
ON ALL TABLES IN SCHEMA analytics.stg
TO ROLE data_engineer_role;
Governance Feature Reference
| Feature | Purpose | Use When |
|---|---|---|
| Masking policy | Dynamically mask column values | Sensitive fields require role/context-based display |
| Row access policy | Filter rows based on policy logic | Multi-tenant, regional, or entitlement-based access |
| Tag | Classify objects/columns | Governance, lineage, policy automation |
| Tag-based masking | Apply masking based on classification | Many sensitive columns need consistent control |
| Secure view | Hide query definition and restrict optimization exposure | Controlled data sharing or sensitive logic |
| Secure UDF | Protect function definition | Sensitive business logic |
| Access History | Audit who accessed what | Compliance, investigations, least-privilege review |
| Object dependencies | Understand upstream/downstream impact | Change management and pipeline safety |
Data Protection and Recovery
| Feature | Use | Do Not Confuse With |
|---|---|---|
| Time Travel | Query, clone, or restore prior object state within retention | Long-term backup strategy by itself |
UNDROP | Restore recently dropped objects when eligible | Fixing corrupted logic after retention expires |
| Zero-copy clone | Create metadata-based copy for dev/test/recovery | Full physical copy at creation time |
| Fail-safe | Snowflake-managed last-resort recovery for permanent data | User-queryable recovery workflow |
| Replication | Copy supported databases/account objects across regions/clouds | Query cache or Time Travel |
| Failover group | Coordinated failover for supported objects | Simple table clone |
CREATE TABLE dev.orders_clone
CLONE prod.orders;
CREATE TABLE recovery.orders_before_change
CLONE prod.orders
AT (TIMESTAMP => '2026-06-18 10:00:00'::TIMESTAMP);
Data Sharing and Collaboration
| Feature | Best For | Notes |
|---|---|---|
| Secure Data Sharing | Share live data without copying | Provider controls shared objects and grants |
| Reader account | Share with consumers without their own Snowflake account | Provider administers reader account |
| Listing / Marketplace | Discoverable data product distribution | Can be private or public depending on setup |
| Secure view in share | Restrict columns/rows before sharing | Combine with masking/row access where needed |
| Replicated share | Cross-region/cloud consumer access patterns | Requires replication design and operational awareness |
Exam traps:
- Sharing exposes objects through grants; it does not copy table data into the consumer account.
- Secure views are common when the provider must restrict shared data.
- Consumer performance depends on consumer-side compute for querying shared data.
- Governance policies must be tested from the consumer’s effective role/context.
Performance and Troubleshooting
Symptom-to-Action Table
| Symptom | Check First | Likely Actions |
|---|---|---|
| Query scans too much data | Query Profile, partitions scanned, filter predicates | Add selective predicates, improve clustering, project typed columns |
| Query spills to disk | Query Profile spill indicators, join size, warehouse size | Scale up warehouse, reduce data earlier, optimize joins |
| Many queued queries | Warehouse load, concurrency, multi-cluster settings | Scale out, separate workloads, adjust task/user warehouses |
| One complex query is slow | Execution plan, joins, aggregates, memory | Scale up, rewrite SQL, precompute, use materialized view/dynamic table |
| Dashboard repeats same expensive query | Query history, result reuse, freshness needs | Consider materialized view, dynamic table, aggregate table |
| Point lookups slow on huge table | Filter selectivity, search predicates | Consider Search Optimization Service |
| Pipeline reprocesses files | Copy history, file names, FORCE use | Fix idempotency and replay design |
| Task did not run | Task state, schedule, dependencies, WHEN condition | Resume task, inspect task history, check stream has data |
| Stream stale or empty unexpectedly | Source retention, consumption transaction, task failures | Consume regularly; monitor stream/task health |
| Snowpipe not loading | Pipe status, notification setup, copy history | Validate stage path, file format, cloud events, pipe errors |
Notes and examples
Query Profile Review Checklist
| Query Profile Area | What It Tells You |
|---|---|
| Compilation time | Excessive optimization/metadata overhead or complex SQL generation |
| Bytes scanned | Whether pruning/projection is effective |
| Partitions scanned | Micro-partition pruning quality |
| Join nodes | Join type, build/probe imbalance, missing filters |
| Aggregate nodes | High-cardinality grouping or late reduction |
| Sort nodes | Large ordering/window operations |
| Spill indicators | Memory pressure; warehouse sizing or SQL rewrite needed |
| Remote vs local I/O | Cache effectiveness and scan cost |
| Queuing | Warehouse concurrency or resource availability issue |
Warehouse Sizing Decisions
| Scenario | Better Lever |
|---|---|
| Single long-running complex query | Larger warehouse, SQL rewrite, precompute |
| Many simultaneous queries | Multi-cluster warehouse or workload separation |
| ETL and BI interfere with each other | Separate warehouses by workload |
| Intermittent workloads | Auto-suspend/auto-resume with appropriate settings |
| Repeated transformations | Tasks/dynamic tables with dedicated warehouse |
| Cost governance | Resource monitors, query review, workload isolation |
Operational Monitoring Reference
| Need | Snowflake Area to Check |
|---|---|
| Query execution details | Query History, Query Profile |
| Warehouse credit and load patterns | Warehouse metering/load history |
| File loads | Copy history, load history |
| Snowpipe health | Pipe status, pipe usage/history |
| Task runs | Task history and task graph state |
| Stream consumption | Stream metadata, task history, source table changes |
| Access auditing | Access History, Login History |
| Object changes | Account Usage views, object dependency metadata |
| Data quality issues | Rejected files, quarantine tables, validation queries |
| Replication/failover | Replication/failover group status and history |
Useful monitoring query patterns:
SELECT
query_id,
warehouse_name,
execution_status,
start_time,
bytes_scanned
FROM snowflake.account_usage.query_history
WHERE warehouse_name = 'ETL_WH'
ORDER BY start_time DESC;
SELECT *
FROM TABLE(information_schema.task_history(
TASK_NAME => 'MERGE_ORDERS_TASK'
))
ORDER BY scheduled_time DESC;
Data Engineering Design Patterns
Bronze / Silver / Gold Mapping
| Layer | Snowflake Objects | Design Goal |
|---|---|---|
| Raw / Bronze | Raw tables, VARIANT, source metadata | Preserve source fidelity and lineage |
| Clean / Silver | Typed tables, validation results, deduped records | Standardize schema and enforce quality |
| Curated / Gold | Marts, aggregates, dynamic tables, materialized views | Serve analytics, ML, and downstream apps |
| Governance | Policies, tags, secure views | Enforce access and classification |
| Operations | Tasks, streams, monitoring tables | Make pipeline health visible |
Notes and examples
Idempotent Pipeline Checklist
- Use deterministic file naming and load tracking.
- Capture
METADATA$FILENAMEand load timestamp. - Separate raw ingestion from business transformation.
- Use
MERGEfor upserts where duplicate events are possible. - Process streams in transactions when multiple target updates must stay consistent.
- Design replay procedures before production failure.
- Quarantine bad records instead of silently discarding them.
- Monitor task, pipe, and copy history.
- Keep transformations set-based wherever possible.
Data Quality Controls
| Control | Example |
|---|---|
| Type validation | TRY_TO_NUMBER, TRY_TO_DATE, explicit casts |
| Required fields | Reject or quarantine rows with missing keys |
| Range checks | Validate amounts, timestamps, status codes |
| Deduplication | Window functions over business keys and event timestamps |
| Referential checks | Compare staged keys to dimension tables |
| Schema drift detection | Compare inferred file schema to expected contract |
| Audit counts | Source count, loaded count, rejected count, merged count |
| Lineage fields | Source file, row number, batch ID, load time |
High-Yield Exam Traps
| Trap | Correct Mental Model |
|---|---|
| “Bigger warehouse always fixes performance.” | Scale up helps some single-query bottlenecks; concurrency may need scale-out or workload isolation |
| “A stream stores all change rows forever.” | A stream tracks change offsets over retained source data; monitor staleness and consumption |
| “Snowpipe replaces transformations.” | Snowpipe loads files; downstream tasks/dynamic tables usually transform |
| “Temporary tables are harmless with duplicate names.” | Temporary objects can shadow permanent names in a session |
| “Fail-safe is for normal user recovery.” | Use Time Travel, cloning, and UNDROP for routine recovery |
| “Clustering should be added to every large table.” | Add clustering only when query pruning benefit justifies maintenance |
| “Semi-structured data requires no modeling.” | Frequently queried fields often belong in typed columns or curated tables |
| “Secure Data Sharing copies provider data.” | Sharing allows live access without copying into the consumer account |
| “Stored procedures are faster than SQL.” | Set-based SQL is usually preferred for relational transformations |
| “Result cache proves the query is optimized.” | Cache can hide inefficient scans; inspect cold-query behavior and profile |
Final DEA-C02 Review Checklist
Before taking DEA-C02, make sure you can quickly answer:
- Which ingestion option fits batch files, continuous files, and low-latency streaming rows?
- How do
COPY INTO, Snowpipe, stages, file formats, and load history interact? - When should you choose streams/tasks versus dynamic tables?
- How do stream metadata columns affect
MERGElogic? - What table type fits production, staging, session-only, and externally stored data?
- How do micro-partitions, pruning, clustering, and search optimization differ?
- When should you scale a warehouse up versus scale out?
- How do masking policies, row access policies, secure views, and tags work together?
- How do Time Travel, cloning,
UNDROP, replication, and Fail-safe differ? - What monitoring view or history area would you check for a failed load, task, pipe, or slow query?
Next step: turn each table above into scenario drills, then practice timed Snowflake data engineering questions that force you to choose the best ingestion, transformation, security, and performance pattern for the stated constraints.
Notes and examples
Final review checklist before practice
Before starting original practice questions, make sure you can explain:
- Difference between
COPY INTO, Snowpipe, and Snowpipe Streaming. - How streams advance offsets and why stream staleness matters.
- When to choose dynamic tables instead of streams and tasks.
- How task graphs are scheduled, triggered, monitored, and debugged.
- How micro-partition pruning, clustering, and search optimization differ.
- Why scaling up and scaling out solve different warehouse problems.
- How to load, query, and flatten semi-structured data.
- How to design idempotent incremental
MERGEpipelines. - How table types, cloning, and retention affect recovery and cost.
- How RBAC, managed access, masking, row access, and secure sharing fit together.
- How to troubleshoot slow queries, failed loads, suspended tasks, and access errors.
High-yield mental model
Snowflake separates storage, compute, and cloud services. Most exam scenarios can be solved by asking:
- Where is the data? Internal stage, external stage, native table, external table, stream, dynamic table, shared object, or semi-structured column.
- How fresh must it be? Batch, near-real-time file ingestion, streaming rows, scheduled transformation, or declarative incremental refresh.
- What workload pattern exists? Large scans, selective lookups, many concurrent users, small repeated queries, heavy transformations, or unpredictable bursts.
- What must be governed? Roles, object privileges, masking, row filtering, tags, shares, stages, integrations, and data retention.
- What is the failure mode? Duplicate files, stale streams, suspended tasks, bad file format options, privilege gaps, warehouse queuing, or excessive maintenance cost.
Fast decision table
| Scenario clue | Strong candidate answer | Common trap |
|---|---|---|
| One-time or scheduled bulk file load | COPY INTO from a stage | Using Snowpipe for large historical backfills without need |
| Continuous file arrival in cloud storage | Snowpipe with auto-ingest cloud events | Expecting heavy transformations inside Snowpipe |
| Low-latency row ingestion from an application | Snowpipe Streaming | Confusing it with file-based Snowpipe |
| CDC-style incremental processing inside Snowflake | Streams + tasks | Selecting from a stream and assuming the offset advances |
| Declarative incremental transformation pipeline | Dynamic tables | Using tasks/procedures when SQL dependency refresh is enough |
| Need procedural branching, API calls, multi-step orchestration | Tasks with SQL, stored procedures, or Snowpark | Forcing dynamic tables to do procedural work |
| Selective point lookups on large tables | Search optimization service, if cost justified | Adding a warehouse size increase only |
| Large scan is slow due to poor pruning | Clustering strategy or data layout review | Clustering small tables automatically |
| Expensive repeated aggregate query | Materialized view, dynamic table, or precomputed table | Assuming result cache solves changing data |
| Many users waiting on warehouse | Scale out with multi-cluster warehouse | Scaling up when the issue is concurrency |
| Single large query is slow | Scale up warehouse, optimize SQL/pruning/spill | Multi-cluster warehouse for one query |
| Need open data lake interoperability | External tables or Iceberg-related design | Assuming native tables and external tables behave identically |
| Need restrict columns or rows dynamically | Masking policies and row access policies | Creating many duplicated secured tables |
Warehouse sizing and workload performance
Scale up versus scale out
| Need | Prefer | Why |
|---|---|---|
| Make one complex query run faster | Larger warehouse | More compute resources for that query |
| Support many simultaneous users or jobs | Multi-cluster warehouse | Adds clusters for concurrency |
| Avoid idle spend | Auto-suspend and auto-resume | Reduces compute time when inactive |
| Control runaway usage | Resource monitors and alerts/actions | Helps manage credit consumption |
| Separate ETL and BI workloads | Separate warehouses | Prevents one workload from starving another |
Notes and examples
Candidate trap: multi-cluster is not a magic accelerator for a single query. It primarily helps concurrency.
Query Profile review checklist
When a performance question describes a slow query, think in this order:
Is the query scanning too much data?
- Review partitions scanned.
- Check filter selectivity.
- Consider clustering, materialized view, or search optimization.
Is the query spilling?
- Local or remote spill suggests memory pressure.
- Consider a larger warehouse or query rewrite.
Is there join explosion or skew?
- Check join predicates.
- Avoid accidental cross joins.
- Pre-aggregate where appropriate.
Is concurrency causing queues?
- Use multi-cluster warehouse or workload isolation.
Is cache behavior misleading?
- A cached result may hide real runtime.
- Changing data, non-deterministic functions, or different query forms can prevent reuse.
Performance features at a glance
| Feature | Best for | Watch out for |
|---|---|---|
| Result cache | Repeated identical/compatible queries on unchanged data | Not a substitute for modeling or pruning |
| Warehouse cache | Repeated access to data by same active warehouse | Lost when warehouse suspends long enough |
| Clustering | Large tables filtered repeatedly on specific columns/expressions | Maintenance cost |
| Search optimization | Highly selective lookups, some semi-structured access patterns | Additional cost; not for broad scans |
| Materialized views | Repeated expensive query patterns with supported SQL | Storage and maintenance cost |
| Dynamic tables | Declarative incremental transformations | Refresh lag and supported query considerations |
| Query acceleration service | Eligible parts of certain large scans | Not every query benefits |
Streams, tasks, and incremental processing
Streams
A stream tracks changes made to a source object so downstream logic can consume deltas.
| Stream type/concept | Review point |
|---|---|
| Standard stream | Captures inserts, deletes, and updates |
| Update representation | Often appears as delete/insert change records |
| Append-only stream | Optimized when only inserts matter |
| Insert-only stream | Relevant for certain external-style ingestion patterns |
| Metadata columns | Include action/update/row identity information |
| Stream offset | Advances when consumed by DML in a transaction |
| Staleness | Streams must be managed before retention makes changes unavailable |
Notes and examples
Candidate trap: querying a stream with SELECT is not the same as consuming it in a DML transaction.
Common stream use cases:
- Incremental
MERGEinto a dimension or fact table. - Capturing new rows from a landing table.
- Processing CDC events.
- Triggering tasks only when data exists.
Tasks
Tasks run SQL, stored procedures, or pipeline steps on a schedule or dependency graph.
| Task concept | Why it matters |
|---|---|
| Scheduled task | Runs by time interval or cron-style schedule |
| Task graph | Child tasks can run after predecessor tasks |
WHEN condition | Commonly checks whether stream data exists |
| Warehouse-backed task | Uses a specified warehouse |
| Serverless task | Snowflake manages compute sizing within supported behavior |
| Task history | Primary troubleshooting source |
| Suspended tasks | A common reason pipelines stop |
Strong task design:
- Keep each task purpose clear.
- Use idempotent
MERGElogic. - Guard stream-processing tasks with data-exists checks.
- Monitor failures and skipped runs.
- Avoid one huge task that hides which step failed.
Streams + tasks pipeline pattern
flowchart LR
A[Files or app data] --> B[Raw landing table]
B --> C[Stream tracks changes]
C --> D[Task checks stream]
D --> E[MERGE into curated table]
E --> F[Downstream marts or features]
Use this pattern when you need procedural control over incremental processing, error handling, or custom merge logic.
Data transformation and modeling
Layered data architecture
A typical Snowflake engineering pattern:
| Layer | Purpose | Typical objects |
|---|---|---|
| Raw/bronze | Land data with minimal transformation | Raw tables, VARIANT, load metadata |
| Clean/silver | Standardize, dedupe, type, validate | Streams, tasks, dynamic tables, views |
| Curated/gold | Business-ready facts/dimensions/marts | Tables, dynamic tables, materialized views |
| Serving | Secure, optimized access | Secure views, shares, BI schemas |
Notes and examples
Exam decisions often ask whether to load raw first or transform immediately. Raw landing is usually safer when auditability, replay, schema drift, and troubleshooting matter.
MERGE and idempotency
Use MERGE when applying incremental changes to a target table.
Good MERGE design:
- Match on stable business keys or surrogate keys.
- Deduplicate source changes before merge.
- Handle deletes if the source CDC includes them.
- Store audit columns such as effective timestamp or load batch.
- Make reruns safe.
Common mistake: merging a stream with duplicate keys without first qualifying the latest change. Use windowing logic such as ROW_NUMBER and QUALIFY when appropriate.
Table types and retention
| Table type | Use case | Key review point |
|---|---|---|
| Permanent | Durable production data | Supports Snowflake retention/recovery behavior according to configuration |
| Transient | Data that can be recreated | Lower durability/recovery overhead than permanent |
| Temporary | Session-scoped intermediate work | Disappears when session ends |
| Clone | Fast copy for dev/test/backfill | Zero-copy until changes diverge |
High-yield traps:
- A zero-copy clone is not a deep physical copy at creation.
- Changes after cloning create independent data changes.
- Temporary tables can shadow permanent tables with the same name in a session.
- Transient objects are a poor choice for data that cannot be recreated.
External data and lake patterns
External tables
External tables let Snowflake query data in external cloud storage without loading it into native Snowflake storage.
Best fit:
- Data lake access.
- Large external datasets where copying is not desired.
- Interoperability with existing object storage pipelines.
Watch out:
- Metadata refresh and partition management matter.
- Performance may differ from native tables.
- Governance must cover stages, storage integrations, and external locations.
- If frequent high-performance analytics are required, loading into native tables may be better.
Iceberg-style considerations
When a scenario emphasizes open table formats, cross-engine interoperability, or lakehouse architecture, consider Snowflake support for Iceberg-related designs. Review storage/catalog choices, governance, and whether the data should be managed as native Snowflake tables or remain interoperable in an external lake format.
Candidate trap: Do not treat external/open-table designs as automatically faster or simpler. They solve interoperability and storage architecture problems, not every performance problem.
Security, governance, and access control
RBAC essentials
Snowflake uses role-based access control. Users receive roles; roles receive privileges on objects.
| Concept | Review point |
|---|---|
| Role hierarchy | Higher-level roles can inherit lower-level roles |
| Least privilege | Grant only required access |
| Ownership | Needed for many object management operations |
| Future grants | Apply privileges to future objects in a schema/database |
| Managed access schema | Centralizes grant management through schema owner/security role |
| Database roles | Useful for database-scoped privilege packaging |
| Secondary roles | Can affect available privileges depending on session behavior |
Notes and examples
Common exam traps:
- Granting table privileges is not enough if the role lacks database/schema usage.
- Stage access may require stage privileges plus storage integration/cloud permissions.
- Ownership and usage are different.
- Future grants do not fix existing object privileges.
- Managed access schemas change who can manage grants.
Data protection controls
| Requirement | Snowflake feature |
|---|---|
| Hide sensitive column values | Masking policy |
| Filter rows by user/role/context | Row access policy |
| Classify and organize metadata | Tags and classification-related workflows |
| Apply masking using tags | Tag-based masking strategy |
| Share data safely | Secure views, shares, reader accounts where appropriate |
| Protect logic in views/UDFs | Secure views or secure UDFs where needed |
Candidate trap: A normal view can simplify access but is not always the right control for sensitive logic or secure data sharing.
Data sharing
Snowflake data sharing can provide access without copying data.
Review:
- Providers share selected database objects.
- Consumers access shared data through a database created from the share.
- Secure views can expose only approved rows/columns.
- Reader accounts may be used when consumers do not have their own Snowflake account.
- Shares require careful privilege and governance design.
Do not claim affiliation with Snowflake or assume data sharing removes the need for access review.
Reliability, recovery, and lifecycle
Time Travel, cloning, and recovery
Key review ideas:
- Time Travel supports querying or restoring previous object states within configured retention.
UNDROPcan recover dropped supported objects within available retention.- Cloning is useful for development, testing, backfills, and safe experimentation.
- Clones are space-efficient initially but incur storage as data changes.
- Retention settings affect recovery options and storage cost.
Pipeline reliability checklist
| Failure symptom | Likely area to inspect |
|---|---|
| Files not loading | Stage path, file pattern, pipe status, cloud notifications, file format |
| Duplicate rows | File naming, FORCE, idempotency, merge keys, stream processing |
| Task not running | Suspended task, schedule, predecessor failure, privileges, warehouse |
| Stream missing data | Staleness, retention, offset consumed, wrong stream type |
| Slow refresh | Warehouse size, query plan, clustering, dynamic table dependencies |
| Access denied | Role hierarchy, database/schema usage, object privilege, integration privilege |
| Unexpected nulls | File format options, schema drift, casts, JSON path mismatch |
Monitoring and troubleshooting
Useful Snowflake information sources
| Need | Where to look |
|---|---|
| Query performance | Query Profile, query history |
| Warehouse load and queues | Warehouse/load history views |
| Task status | Task history |
| Pipe status | Pipe metadata and load history |
| Copy/load errors | Load history, validation mode, rejected row details |
| Access issues | Grants, role hierarchy, current role/session context |
| Storage growth | Table/storage history and object review |
| Policy behavior | Policy definitions, tags, role context |
Troubleshooting sequence for exam questions
- Confirm the object and role context.
- Validate upstream data presence.
- Check file format, stage path, and load metadata.
- Review task/pipe/stream status.
- Inspect query history and profile.
- Fix idempotency before rerunning failed loads.
- Add monitoring after the root cause is known.
SQL and Snowflake feature traps
Common DEA-C02 candidate mistakes
| Mistake | Better thinking |
|---|---|
| Always increasing warehouse size | First identify scan, spill, skew, or queueing |
| Using multi-cluster for one slow query | Multi-cluster is mainly for concurrency |
| Loading directly to final tables | Land raw when replay/audit/schema drift matters |
| Ignoring duplicate protection | Design with load metadata and idempotent merges |
Assuming stream SELECT consumes changes | Offsets advance with consuming DML transaction |
| Using tasks for everything | Dynamic tables may simplify declarative transformations |
| Using dynamic tables for procedural logic | Use tasks/procedures/Snowpark for procedural workflows |
| Clustering every table | Cluster only when pruning benefit justifies cost |
| Expecting external tables to act like native tables | External metadata, partitions, and performance differ |
| Forgetting schema usage grants | Object privilege alone is not enough |
| Hardcoding cloud keys | Prefer storage integrations and governed access |
| Flattening nested arrays carelessly | Watch row explosion and join logic |
Service selection mini-guide
| If the question says… | Think… |
|---|---|
| “Files arrive every few minutes in cloud storage” | Snowpipe auto-ingest |
| “Backload several terabytes from existing files” | Bulk COPY INTO with right warehouse and validation |
| “Application needs to send event rows with low latency” | Snowpipe Streaming |
| “Process only new rows since last run” | Stream on source table plus task/merge |
| “SQL-defined table should stay fresh within target lag” | Dynamic table |
| “Orchestrate multiple dependent SQL steps nightly” | Task graph |
| “Run Python transformations close to the data” | Snowpark or Python stored procedures |
| “Repeated dashboard aggregate is expensive” | Materialized view, dynamic table, or curated aggregate table |
| “Large table point lookup is slow” | Search optimization or better clustering, depending pattern |
| “Share governed subset with another account” | Secure view/share design |
| “Mask PII based on role” | Masking policy, possibly tag-based |
| “Filter rows by region or tenant” | Row access policy |
Practice focus
Use this Cheat Sheet as a map, then move into IT Mastery practice:
- Start with topic drills on ingestion, streams/tasks, dynamic tables, and performance.
- Review every missed item with detailed explanations, especially when two Snowflake features look similar.
- Use original practice questions to test decision-making, not memorized commands only.
- Finish with mixed question bank sets that combine loading, transformation, security, and troubleshooting scenarios.
Next step: practice a focused DEA-C02 topic drill on Snowflake ingestion and incremental pipeline design, then review the explanations for every answer choice.