Skip to main content
๐Ÿ“˜ Complete PDF

Snowflake Certification Practice Test 11

Practice Test 11

Question 1 of 20
๐Ÿ“‹ Multiple Choice
Question 181
A newly joined Snowflake Support Engineer receives a Sev-2 incident at 2:00 AM. The Finance department reports that the daily revenue dashboard did not refresh. Investigation shows: - Source files arrived in cloud storage successfully - Snowpipe loaded files into the raw landing table successfully - The CDC Stream on the raw table contains thousands of unprocessed records - The final Gold reporting table was not updated What should the support engineer investigate FIRST?
โœ“
A. Downstream Task Execution History and Failure Error Messages
B. Warehouse naming convention guidelines in company Wiki
C. Database comment strings in the information schema
D. Search Optimization Service index maintenance schedules
Answer
โœ… A. Downstream Task Execution History and Failure Error Messages
Explanation

1. Direct Question Answer & Core Concept โœ… A. Downstream Task Execution History and Failure Error Messages

Core Concept: In a continuous CDC pipeline using Snowpipe, Streams, and Tasks, if the stream holds unconsumed records while the target table remains stale, the downstream consumer task that processes the stream has failed, suspended, or timed out.

2. Deep-Dive Analytical Explanation Tracing a broken pipeline requires inspecting the boundary where data progression stopped. The telemetry shows Snowpipe successfully loaded raw data, and the Stream captured the change data capture (CDC) delta records. However, those records were never consumed from the stream into the Gold reporting table. Naming conventions (Option B), database comments (Option C), and Search Optimization (Option D) have zero bearing on task execution failures. In Snowflake's stream-and-task architecture, when a task executes a DML statement (`MERGE INTO ... SELECT ... FROM my_stream`), the stream offset advances only upon transaction commit. If the task failed (due to warehouse outage, syntax error, memory limit, or schema mismatch), the stream retains the records and the target table is never updated.

3. Comprehensive Option Analysis & Distractor Dissection - **B. Warehouse naming convention guidelines in company Wiki:** Administrative style conventions do not cause operational pipeline halts. - **C. Database comment strings in the information schema:** Metadata documentation strings have no role in runtime SQL execution. - **D. Search Optimization Service index maintenance schedules:** SOS accelerates point-lookup queries on large tables; it does not process streaming ingestion pipelines.

4. Architectural & Execution Context / Physical Execution Snowflake CDC pipelines combine three components: Snowpipe (serverless file ingestion) -> Table (storage) -> Stream (change tracking) -> Task (scheduled DML). Querying `TABLE(INFORMATION_SCHEMA.TASK_HISTORY())` provides the exact state (`FAILED`, `CANCELLED`), error code, and error message.

5. Practical Code Example

/* Diagnosing task failure in Snowflake Information Schema */
SELECT 
    NAME,
    SCHEMA_NAME,
    STATE,
    ERROR_CODE,
    ERROR_MESSAGE,
    SCHEDULED_TIME,
    QUERY_START_TIME,
    COMPLETED_TIME
FROM TABLE(INFORMATION_SCHEMA.TASK_HISTORY(
    SCHEDULED_TIME_RANGE_START => DATEADD('hour', -4, CURRENT_TIMESTAMP()),
    TASK_NAME => 'POPULATE_DAILY_REVENUE_TASK'
))
ORDER BY SCHEDULED_TIME DESC;

6. Key Takeaway When a Snowflake Stream contains unconsumed records but target tables are stale, query `TASK_HISTORY` first to diagnose why the downstream consumer task failed.

7. Best Practice & Production Recommendation Always configure task error notifications using `ERROR_INTEGRATION` pointing to Amazon SNS, Azure Event Grid, or GCP Pub/Sub to receive instant alerts upon task failure.

8. Real-World Engineering Scenario A revenue task failed silently because a source ERP upgrade added an unmapped column that broke the task's `MERGE` statement. Querying `TASK_HISTORY` immediately revealed the SQL compilation error, allowing the on-call engineer to update the statement and resume the task.

9. Common Exam Trap / Anti-Pattern / Misconception Querying `QUERY_HISTORY` without filtering by task name; `TASK_HISTORY` specifically records task scheduling state, skipped runs, and serverless execution failures that might not appear in standard user query filters.

10. Related InsightfulSaga Tutorial Master these concepts in [Snowflake Tasks & Scheduled Execution](/tutorials/snowflake/snowflake-tasks).

Answered: 0 / 20
Question Navigator (Test 11)0% Answered