Intermediate Snowflake test (Intermediate)
30 questions · 35 minutes · Free
Micro-partitions, clustering, Time Travel, streams, tasks and Snowpipe.
Take the Intermediate Snowflake test
What it covers
- Snowflake micro-partitions and clustering
- Snowflake Time Travel and Fail-safe
- Snowflake streams and tasks
- Snowpipe
- Snowflake semi-structured data
Interview format
- Questions: 30 questions — 18 multiple choice, 9 multi-answer, 3 predict-the-output
- Time: 35 minutes, timed from the first question
- Difficulty: Intermediate
- Skill area: Data
- Price: Free
Earn a certificate
The Intermediate Snowflake test is one of the 7 tests of the Data Engineer learning path. Pass it and the other 6 tests at 70% or more and readyforhires issues you a verifiable certificate in your name, with its own code and verify link to share or add to LinkedIn.
Sample questions
5 sample questions from the Intermediate Snowflake test, with the answers. Samples are taken out of the live test, so you will not meet these when you sit it.
Which statement is correct regarding the use of the UNDROP TABLE command in Snowflake when the DATA_RETENTION_TIME_IN_DAYS is set to 0?
- The table can be restored using UNDROP TABLE only if it was dropped within the DATA_RETENTION_TIME_IN_DAYS period.
- The table can always be restored using UNDROP TABLE regardless of the DATA_RETENTION_TIME_IN_DAYS setting.
- The table can be restored using the Fail-safe feature if it was dropped within the DATA_RETENTION_TIME_IN_DAYS period.
- The table can be restored using the Fail-safe feature even if it was dropped outside the DATA_RETENTION_TIME_IN_DAYS period.
Answer: A. The table can be restored using UNDROP TABLE only if it was dropped within the DATA_RETENTION_TIME_IN_DAYS period.
If a table is dropped and the DATA_RETENTION_TIME_IN_DAYS is set to 0, the table cannot be restored using UNDROP TABLE. This is a common mistake because users may not realize that setting the retention period to 0 permanently removes the table from Time Travel, making it impossible to recover using UNDROP.
Which statement accurately describes the fail-safe data recovery process and how it compares to Time Travel?
- Fail-safe and Time Travel are identical mechanisms that can be used interchangeably for data recovery, regardless of table type.
- Fail-safe is a recovery mechanism for all tables and can be accessed by users, while Time Travel is only available for temporary tables and cannot be queried.
- Fail-safe is a recovery mechanism for permanent tables only and can only be accessed by Snowflake support, while Time Travel can be used by users to query, clone, or restore data within the retention period.
- Fail-safe is used for querying historical data, while Time Travel is used for restoring dropped tables and is available for all table types.
Answer: C. Fail-safe is a recovery mechanism for permanent tables only and can only be accessed by Snowflake support, while Time Travel can be used by users to query, clone, or restore data within the retention period.
Fail-safe is an automatic backup mechanism for permanent tables that is not accessible by users and can only be accessed by Snowflake support. In contrast, Time Travel allows users to query, clone, or restore data as it was in the past within the retention period. Fail-safe is only available for permanent tables, while Time Travel applies to both permanent and transient tables. Transient and temporary tables do not have Fail-safe protection.
Which of the following statements is correct regarding the performance optimization of Snowpipe compared to bulk COPY in Snowflake?
- Snowpipe is better for ingestion of small files, while bulk COPY is better for ingestion of large files.
- Snowpipe is better for one-time ingestion of large volumes of data, while bulk COPY is better for continuous ingestion of files.
- Snowpipe is better for continuous ingestion of files, while bulk COPY is better for one-time ingestion of large volumes of data.
- Snowpipe and bulk COPY are equally efficient for both continuous and one-time ingestion of data.
Answer: C. Snowpipe is better for continuous ingestion of files, while bulk COPY is better for one-time ingestion of large volumes of data.
Snowpipe is designed for continuous, real-time ingestion of files, making it ideal for scenarios where data is constantly being added to a stage. It is billed per-second and supports auto-ingestion via cloud storage events. On the other hand, bulk COPY is more efficient for one-time ingestion of large volumes of data, as it is optimized for batch processing and does not require the same level of continuous monitoring or integration with cloud storage events. Bulk COPY is also more cost-effective for large, one-time data loads.
What will the following SQL query return in Snowflake: `SELECT * FROM orders AT(OFFSET => -60*5);`?
- The query will return an error because the OFFSET parameter is not supported in Snowflake.
- The query will return the current state of the 'orders' table, as the OFFSET parameter is ignored.
- The query will return the state of the 'orders' table at the time of the last transaction, regardless of the OFFSET parameter.
- The query will return the state of the 'orders' table 5 minutes ago, as it uses the OFFSET parameter with a timestamp offset.
Answer: D. The query will return the state of the 'orders' table 5 minutes ago, as it uses the OFFSET parameter with a timestamp offset.
The SQL query `SELECT * FROM orders AT(OFFSET => -60*5);` uses Snowflake's Time Travel feature to query the state of the 'orders' table 5 minutes ago. The OFFSET parameter specifies the number of seconds to go back in time, and in this case, it is set to -60*5, which equals -300 seconds or 5 minutes. This is a valid and correct usage of Time Travel syntax. The other options describe incorrect behaviors or misunderstandings of how Time Travel works in Snowflake.
What happens to a Snowflake stream's offset and its changes if a user runs a SELECT query on the stream but does not consume the changes with a DML operation that commits?
- The stream's offset will advance, and the changes will be removed from the stream.
- The stream will be marked as stale, and the changes will be permanently lost.
- The stream's offset will not advance, and the changes will remain in the stream until it is consumed.
- The stream's offset will reset to the beginning, and all changes will be reprocessed.
Answer: C. The stream's offset will not advance, and the changes will remain in the stream until it is consumed.
In Snowflake, querying a stream with a SELECT statement does not advance the stream's offset. This means that the changes remain in the stream until they are consumed via a DML operation that commits, such as an INSERT, UPDATE, or DELETE. If a user only runs a SELECT on the stream and does not perform a consuming operation, the offset remains at its previous position, and the changes are not removed from the stream.
Frequently asked questions
- How many questions are in the Intermediate Snowflake test?
- 30 questions (18 multiple choice, 9 multi-answer, 3 predict-the-output), with 35 minutes to answer them.
- What does the Intermediate Snowflake test cover?
- Snowflake micro-partitions and clustering, Snowflake Time Travel and Fail-safe, Snowflake streams and tasks, Snowpipe, Snowflake semi-structured data.
- Is the Intermediate Snowflake test free?
- Yes. It is free to take with a readyforhires account.
- What level is the Intermediate Snowflake test?
- Intermediate, in Data.