Skip to content

SnowPro-Advanced-Data-Engineer Practice Questions

Prepare for SnowPro-Advanced-Data-Engineer with more than an answer.

188 questions in the full set20 sample questionsUpdated Oct 18, 2025
Exam fee
$375 USD
Level
Advanced
Valid for
2 years
Domains covered on the exam 5
  1. Data Movement27.5%
  2. Performance Optimization22.5%
  3. Storage and Data Protection12.5%
  4. Security12.5%
  5. Data Transformation27.5%
  1. 1

    Case Study:

    A retail company, GlobalMart, is building a centralized data platform in Snowflake. They have two main data sources: transactional data from on-premises POS systems and streaming clickstream data from their e-commerce website via Kafka.

    Current Situation:

    • POS data is batch-extracted daily as 10GB of compressed CSV files and uploaded to an AWS S3 bucket.
    • Clickstream data is available on a Kafka topic with an average of 1,000 messages per second.
    • A TRANSACTIONS table needs to be populated from the POS data, and a CLICKSTREAM table from the Kafka topic.
    • A CUSTOMER_ACTIVITY materialized view is planned to join TRANSACTIONS and CLICKSTREAM data for real-time dashboarding.

    Requirements:

    1. POS data must be loaded into the TRANSACTIONS table within one hour of its arrival in S3.
    2. Clickstream data must be available in the CLICKSTREAM table with an end-to-end latency of less than 15 seconds.
    3. The data loading process must be serverless and automated.
    4. Data engineers need a way to monitor the health and cost of both ingestion pipelines.

    Which solution design BEST meets all of GlobalMart's requirements?

    Show answer details

    Correct answer: C

    This solution correctly assigns the best tool for each job. Snowpipe auto-ingest is perfect for the event-driven, file-based POS data. Snowpipe Streaming via the Kafka Connector is the only option that can reliably meet the sub-15-second latency requirement for the high-volume clickstream data. Both are serverless and automated. Monitoring can be achieved using the specified account usage views, covering both ingestion methods.

  2. 2

    A data pipeline uses a stream to capture changes on a source table. A downstream task consumes the stream within a BEGIN...COMMIT transaction block. During a specific run, the task successfully reads the stream data into a staging table but fails before the final COMMIT statement due to a transient network error. What happens to the stream's offset?

    Show answer details

    Correct answer: B

    Consuming a stream is a transactional operation. The stream's offset only advances when the transaction that reads from it is successfully committed. If the transaction fails and is rolled back for any reason, the stream's offset remains unchanged. The next time the stream is queried, it will return the same set of changes, ensuring exactly-once processing semantics.

  3. 3

    A data engineer is tasked with optimizing a large, heavily queried table USER_SESSIONS. The table is currently clustered by SESSION_START_TIME. However, a critical dashboard frequently queries the table with highly selective filters on USER_ID, which has very high cardinality. These queries are slow due to poor pruning. Adding USER_ID to the clustering key is not feasible as it would conflict with existing range-based queries on SESSION_START_TIME. What is the most appropriate and cost-effective solution?

    Show answer details

    Correct answer: B

    The Search Optimization Service is designed for this exact scenario: improving the performance of point-lookup queries on high-cardinality columns that are not part of the table's clustering key. It creates and maintains a separate search access path without requiring changes to the clustering key, thus accelerating the USER_ID lookups without negatively impacting the existing time-based queries.

  4. 4

    A data engineer observes that a table's clustering depth is consistently increasing, and query performance is degrading. The table is configured with a clustering key and automatic clustering is enabled. What is the MOST likely reason that automatic clustering is not maintaining the table's clustering health?

    Show answer details

    Correct answer: C

    Automatic Clustering is a background process that reclusters tables only after a substantial amount of DML (INSERT, UPDATE, DELETE) has occurred. If the table is largely static or has very infrequent changes, the service may not see enough benefit to justify the cost of a reclustering operation, even if the initial clustering state is poor or has degraded over time. The lack of recent DML is a key reason why an automatically clustered table might remain poorly clustered.

  5. 5

    A data engineer needs to create a stored procedure in Snowflake Scripting to iterate through a list of table names and perform a TRUNCATE operation on each. The procedure must handle cases where a table in the list does not exist without halting execution. Which Snowflake Scripting construct is best suited for this requirement?

    flowchart TD Start([Start Procedure]) --> Loop{For each table in list} Loop --> |Table Exists| Truncate[TRUNCATE TABLE] Loop --> |Table Doesn't Exist| Continue[Continue to next table] Truncate --> Loop Continue --> Loop Loop -->|End of List| End([End Procedure])
    Show answer details

    Correct answer: B

    The BEGIN...EXCEPTION...END block is the standard mechanism for structured exception handling in Snowflake Scripting. By wrapping the TRUNCATE command for each table inside its own BEGIN...END block with an EXCEPTION handler, the procedure can catch the 'object does not exist' error for a specific table, handle it (e.g., by logging or ignoring it), and then continue the loop to the next table without terminating the entire procedure.

  6. 6

    A financial services company is implementing a near real-time fraud detection pipeline. Transaction data arrives via a Kafka topic. The data engineering team must choose between Snowpipe and Snowpipe Streaming for ingestion. A key requirement is to minimize ingestion latency to under 5 seconds per batch of records. Which factor is the MOST critical in deciding to use Snowpipe Streaming over the traditional Snowpipe REST API?

    Show answer details

    Correct answer: C

    Snowpipe Streaming is designed for ultra-low latency by writing rows directly to Snowflake tables without first staging them as files in cloud storage. This direct ingestion method is the key architectural difference that allows it to meet sub-second latency requirements, making it the superior choice over traditional Snowpipe for this use case.

  7. 7

    A data science team is developing a sentiment analysis model using a custom Python library packaged as a .whl file. This library is not available on Anaconda or PyPI. A data engineer needs to make this library available to a Snowpark Python UDF for batch scoring. The security policy prohibits direct runtime package installation from public repositories. What is the recommended approach to securely deploy and use this custom library?

    Show answer details

    Correct answer: B

    The correct and most efficient method for using custom, non-public Python libraries is to upload the packaged wheel (.whl) or zip file to a Snowflake stage. Then, during UDF creation, you specify the path to this file in the IMPORTS clause. Snowflake will automatically distribute and unpack the library in the secure sandbox environment where the UDF executes.

  8. 8

    A data engineer is analyzing the query profile of a long-running query that joins a large fact table (TRANSACTIONS, 5TB) with several small dimension tables. The profile indicates significant remote disk I/O (65% of execution time) and poor partition pruning (90% of partitions scanned). The TRANSACTIONS table is clustered by TRANSACTION_DATE. The problematic query filters on CUSTOMER_ID. Which action would provide the MOST significant and targeted performance improvement for this specific query?

    Show answer details

    Correct answer: D

    The query profile indicates poor pruning on a non-clustering key column (CUSTOMER_ID). The Search Optimization Service is specifically designed to improve the performance of selective point-lookup queries on high-cardinality columns that are not part of the clustering key. It creates a persistent data structure to accelerate these lookups, directly addressing the root cause of the poor pruning and remote I/O.

  9. 9

    A data engineer has created a stream object on a RAW_EVENTS table to capture changes for an ELT pipeline. The stream is consumed by a task that runs every 5 minutes. The task failed to run for 3 hours due to a permission issue, which has now been resolved. The RAW_EVENTS table has a data retention period of 1 day. What will be the state of the stream when the task runs successfully for the first time after the outage?

    Show answer details

    Correct answer: C

    A stream maintains its own offset and tracks all changes since it was last consumed. As long as the change data is still within the source table's Time Travel retention period (1 day in this case), the stream will not lose data. When the consuming task finally runs, it will read all accumulated changes from the stream since its last successful consumption, which includes the entire 3-hour period.

  10. 10

    A data architect needs to enforce column-level security on a table containing employee data, including PII like SALARY and SSN. The requirements are:

    1. Analysts in the HR_ANALYST role should see the full, unmasked data.
    2. All other roles, including ACCOUNTADMIN, should see masked values (e.g., 'XXX-XX-XXXX' for SSN).

    Which combination of objects and privileges is required to correctly implement this? (Select TWO)

    Show answer details

    Correct answer: A, C

Create an account to continue.