ExamGecko
Home Home / Snowflake / DEA-C01

Snowflake DEA-C01 Practice Test - Questions Answers, Page 4

Question list
Search
Search

List of questions

Search

Melissa, Senior Data Engineer, looking out to optimize query performance for one of the Critical Control Dashboard, she found that most of the searches by the users on the control dashboards are based on Equality search on all the underlying columns mostly. Which Best techniques she should consider here?

A.
She can go for clustering on underlying tables which can speedup Equality searches.
A.
She can go for clustering on underlying tables which can speedup Equality searches.
Answers
B.
A materialized view speeds both equality searches and range searches.
B.
A materialized view speeds both equality searches and range searches.
Answers
C.
The search optimization service would best fit here as it can be applied to all underlying columns & speeds up equality searches.(Correct)
C.
The search optimization service would best fit here as it can be applied to all underlying columns & speeds up equality searches.(Correct)
Answers
D.
Melissa can create Indexes & Hints on the searchable columns to speed up Equality search.
D.
Melissa can create Indexes & Hints on the searchable columns to speed up Equality search.
Answers
Suggested answer: C

Explanation:

Clustering a table can speed any of the following, as long as they are on the clustering key:

· Range searches.

· Equality searches.

However, a table can be clustered on only a single key (which can contain one or more columns or expressions).

The search optimization service speeds equality searches. However, this applies to all the columns of supported types in a table that has search optimization enabled. This is what required here& best fit for purpose.

A materialized view speeds both equality searches and range searches, as well as some sort operations, but only for the subset of rows and columns included in the materialized view.

Search optimization works best to improve the performance of a query when the following conditions are true:[Select All that apply]

A.
The table is not clustered.
A.
The table is not clustered.
Answers
B.
The table is frequently queried on columns other than the primary cluster key.
B.
The table is frequently queried on columns other than the primary cluster key.
Answers
C.
Search Query uses Equality predicates (for example, <column_name> = <constant>) OR Predicates that use IN.
C.
Search Query uses Equality predicates (for example, <column_name> = <constant>) OR Predicates that use IN.
Answers
D.
Search Query uses Sort Operations.
D.
Search Query uses Sort Operations.
Answers
Suggested answer: A, B, C

Explanation:

Materialized Views works best for search query performance in case of Sort Operations. For Rest of the points Search optimization works best to improve query performance.

Regular views do not cache data, and therefore cannot improve performance by caching?

A.
TRUE
A.
TRUE
Answers
B.
FALSE
B.
FALSE
Answers
Suggested answer: A

Explanation:

Regular views do not cache data, and therefore cannot improve performance by caching.

Mark the correct statements about Cache?

A.
Materialized views are more flexible than, but typically slower than, cached results.
A.
Materialized views are more flexible than, but typically slower than, cached results.
Answers
B.
Materialized views are faster than tables because of their "cache" (i.e. the query results for the view); in addition, if data has changed, they can use their "cache" for data that hasn't changed and use the base table for any data that has changed.
B.
Materialized views are faster than tables because of their "cache" (i.e. the query results for the view); in addition, if data has changed, they can use their "cache" for data that hasn't changed and use the base table for any data that has changed.
Answers
C.
For persisted query results of all sizes, the cache expires after 24 hours.
C.
For persisted query results of all sizes, the cache expires after 24 hours.
Answers
D.
The size of the warehouse cache is determined by the compute resources in the ware-house.
D.
The size of the warehouse cache is determined by the compute resources in the ware-house.
Answers
E.
Warehouse cache is dropped when the warehouse is suspended, which may result in slower initial performance for some queries after the warehouse is resumed.
E.
Warehouse cache is dropped when the warehouse is suspended, which may result in slower initial performance for some queries after the warehouse is resumed.
Answers
Suggested answer: A, B, C, D, E

Explanation:

How Does Warehouse Caching Impact Queries?

Each warehouse, when running, maintains a cache of table data accessed as queries are processed by the warehouse. This enables improved performance for subsequent queries if they are able to read from the cache instead of from the table(s) in the query. The size of the cache is determined by the compute resources in the warehouse (i.e. the larger the warehouse and, therefore, more compute re-sources in the warehouse), the larger the cache.

This cache is dropped when the warehouse is suspended, which may result in slower initial performance for some queries after the warehouse is resumed. As the resumed warehouse runs and processes more queries, the cache is rebuilt, and queries that are able to take advantage of the cache will experience improved performance.

Keep this in mind when deciding whether to suspend a warehouse or leave it running. In other words, consider the trade-off between saving credits by suspending a warehouse versus maintaining the cache of data from previous queries to help with performance.

Using Persisted Query Results

When a query is executed, the result is persisted (i.e. cached) for a period of time. At the end of the time period, the result is purged from the system.

Snowflake uses persisted query results to avoid re-generating results when nothing has changed (i.e.

"retrieval optimization"). In addition, you can use persisted query results to post-process the results (e.g. layering a new query on top of the results already calculated).

For persisted query results of all sizes, the cache expires after 24 hours.

Both materialized views and cached query results provide query performance benefits:

Materialized views are more flexible than, but typically slower than, cached results.

Materialized views are faster than tables because of their "cache" (i.e. the query results for the view); in addition, if data has changed, they can use their "cache" for data that hasn't changed and use the base table for any data that has changed.

Regular views do not cache data, and therefore cannot improve performance by caching.

Marko, a Data Engineer is using Snowpipe for data loading in micro batches for one of the Finance

Data workloads. There are set of files he attempted to load into the snowflake table using Snow-pipe.

While monitoring he found that there are set of files has multiple issue, He queried the COPY_HISTORY view & checked the STATUS column which indicates whether a particular set of files was loaded, partially loaded, or failed to load. But he wants to view all errors in the files along with Load status, how he can check all errors?

A.
He can check RETURN_ALL_ERROR_MESSAGE column in the COPY_HISTORY view which can provides a reason and view all errors in the files.
A.
He can check RETURN_ALL_ERROR_MESSAGE column in the COPY_HISTORY view which can provides a reason and view all errors in the files.
Answers
B.
He can view all errors in the files, by executing a COPY INTO <table> statement with the VALIDATION_ERROR_MODE copy option set to RE-TURN_ALL_PIPE_ERRORS.
B.
He can view all errors in the files, by executing a COPY INTO <table> statement with the VALIDATION_ERROR_MODE copy option set to RE-TURN_ALL_PIPE_ERRORS.
Answers
C.
Marko can look out for FIRST_ERROR_MESSAGE column in the COPY_HISTORY view which can provides a reason why a file partially loaded or failed for all the files.
C.
Marko can look out for FIRST_ERROR_MESSAGE column in the COPY_HISTORY view which can provides a reason why a file partially loaded or failed for all the files.
Answers
D.
He can view all errors in the files, by executing a COPY INTO <table> statement with the VALIDATION_MODE copy option set to RETURN_ALL_ERRORS.
D.
He can view all errors in the files, by executing a COPY INTO <table> statement with the VALIDATION_MODE copy option set to RETURN_ALL_ERRORS.
Answers
Suggested answer: D

Explanation:

The STATUS column indicates whether a particular set of files was loaded, partially loaded, or failed to load. The FIRST_ERROR_MESSAGE column provides a reason when an attempt partial-ly loaded or failed.

Note that if a set of files has multiple issues, the FIRST_ERROR_MESSAGE column only indi-cates the first error encountered. To view all errors in the files, execute a COPY INTO <table> statement with the VALIDATION_MODE copy option set to RETURN_ALL_ERRORS. The VALIDATION_MODE copy option instructs a COPY statement to validate the data to be loaded and return results based on the validation option specified. No data is loaded when this copy option is specified.

Robert, A Data Engineer, found that Pipe become stale as it was paused for longer than the limited retention period for event messages received for the pipe (14 days by default) & also the previous pipe owner transfers the ownership of this pipe to Robert role while the pipe was paused. How Robert in this case, Resume this stale pipe?

A.
PIPE needs to recreate in this scenario, as pipe already past 14 days of period & stale.
A.
PIPE needs to recreate in this scenario, as pipe already past 14 days of period & stale.
Answers
B.
He can apply System function SYSTEM$PIPE_STALE_RESUME with ALTER PIPE statement.
B.
He can apply System function SYSTEM$PIPE_STALE_RESUME with ALTER PIPE statement.
Answers
C.
Robert can use SYSTEM$PIPE_FORCE_RESUME function to resume this stale pipe.
C.
Robert can use SYSTEM$PIPE_FORCE_RESUME function to resume this stale pipe.
Answers
D.
select sys-tem$pipe_force_resume('mydb.myschema.stalepipe','staleness_check_override, ownership_transfer_check_override');
D.
select sys-tem$pipe_force_resume('mydb.myschema.stalepipe','staleness_check_override, ownership_transfer_check_override');
Answers
E.
ALTER PIPES ... RESUME statement will resume the pipe.
E.
ALTER PIPES ... RESUME statement will resume the pipe.
Answers
Suggested answer: D

Explanation:

When a pipe is paused, event messages received for the pipe enter a limited retention period. The period is 14 days by default. If a pipe is paused for longer than 14 days, it is considered stale.

To resume a stale pipe, a qualified role must call the SYSTEM$PIPE_FORCE_RESUME function and input the STALENESS_CHECK_OVERRIDE argument. This argument indicates an under-standing that the role is resuming a stale pipe.

For example, resume the stale stalepipe1 pipe in the mydb.myschema database and schema:

SELECT SYS-TEM$PIPE_FORCE_RESUME('mydb.myschema.stalepipe1','staleness_check_override');

While the stale pipe was paused, if ownership of the pipe was transferred to another role, then resuming the pipe requires the additional OWNERSHIP_TRANSFER_CHECK_OVERRIDE argu-ment. For example, resume the stale stalepipe2 pipe in the mydb.myschema database and schema, which transferred to a new role:

SELECT SYS-TEM$PIPE_FORCE_RESUME('mydb.myschema.stalepipe1','staleness_check_override, own-ership_transfer_check_override');

How Data Engineer can do Monitoring of Files which are Staged Internally during Continuous data pipelines loading process? [Select all that apply]

A.
She Can Monitor the files using Metadata maintained by Snowflake i.e. file-name,last_modified date etc.
A.
She Can Monitor the files using Metadata maintained by Snowflake i.e. file-name,last_modified date etc.
Answers
B.
Snowflake retains historical data for COPY INTO commands executed within the pre-vious 14 days.
B.
Snowflake retains historical data for COPY INTO commands executed within the pre-vious 14 days.
Answers
C.
She can Monitor the status of each COPY INTO <table> command on the History tab page of the classic web interface.
C.
She can Monitor the status of each COPY INTO <table> command on the History tab page of the classic web interface.
Answers
D.
She can use the DATA_LOAD_HISTORY Information Schema view to retrieve the history of data loaded into tables using the COPY INTO command.
D.
She can use the DATA_LOAD_HISTORY Information Schema view to retrieve the history of data loaded into tables using the COPY INTO command.
Answers
E.
She can use the DATA_VALIDATE function to validate the data files She have loaded and can retrieve any errors encountered during the load.
E.
She can use the DATA_VALIDATE function to validate the data files She have loaded and can retrieve any errors encountered during the load.
Answers
Suggested answer: A, B, C

Explanation:

Monitoring Files Staged Internally

Snowflake maintains detailed metadata for each file uploaded into internal stage (for users, tables, and stages), including:

· File name · File size (compressed, if compression was specified during upload) · LAST_MODIFIED date, i.e. the timestamp when the data file was initially staged or when it was last modified, whichever is later

In addition, Snowflake retains historical data for COPY INTO commands executed within the pre-vious 14 days. The metadata can be used to monitor and manage the loading process, including de-leting files after upload completes:

· Use the LIST command to view the status of data files that have been staged.

· Monitor the status of each COPY INTO <table> command on the History tab page of the classic web interface.

· Use the VALIDATE function to validate the data files you've loaded and retrieve any errors encountered during the load.

· Use the LOAD_HISTORY Information Schema view to retrieve the history of data loaded into tables using the COPY INTO command.

To help manage STAGE storage costs, Data engineer recommended to monitor stage files and remove them from the stages once the data has been loaded and the files which are no longer needed.

Which option he can choose to remove these files either during data loading or afterwards?

A.
He can choose to remove stage files during data loading (using the COPY INTO <table> command).
A.
He can choose to remove stage files during data loading (using the COPY INTO <table> command).
Answers
B.
Files no longer needed, can be removed using the PURGE=TRUE command.
B.
Files no longer needed, can be removed using the PURGE=TRUE command.
Answers
C.
Files no longer needed, can be removed using the REMOVE command.
C.
Files no longer needed, can be removed using the REMOVE command.
Answers
D.
Script can be used during data loading & post data loading with DELETE command.
D.
Script can be used during data loading & post data loading with DELETE command.
Answers
Suggested answer: A, B

Explanation:

Managing Data Files

Staged files can be deleted from a Snowflake stage (user stage, table stage, or named stage) using the following methods:

· Files that were loaded successfully can be deleted from the stage during a load by specifying the PURGE copy option in the COPY INTO <table> command.

· After the load completes, use the REMOVE command to remove the files in the stage.

Removing files ensures they aren't inadvertently loaded again. It also improves load performance, because it reduces the number of files that COPY commands must scan to verify whether existing files in a stage were loaded already.

Pascal, a Data Engineer, have requirement to retrieve the 10 most recent executions of a specified task (completed, still running, or scheduled in the future) scheduled within the last hour, which of the following is the correct SQL Code ?

A.
A.
Answers
B.
select *
B.
select *
Answers
C.
from table(information_schema.task_history(
C.
from table(information_schema.task_history(
Answers
D.
scheduled_time_range_start=>dateadd('hour',-1,current_timestamp()),
D.
scheduled_time_range_start=>dateadd('hour',-1,current_timestamp()),
Answers
E.
result_limit => 10,
E.
result_limit => 10,
Answers
F.
task_name=>'MYTASK') WHERE query_id IS NOT NULL);
F.
task_name=>'MYTASK') WHERE query_id IS NOT NULL);
Answers
G.
G.
Answers
H.
select *
H.
select *
Answers
I.
from table(information_schema.task_history(
I.
from table(information_schema.task_history(
Answers
J.
scheduled_time_range_start=>dateadd('hour',-1,current_timestamp()),
J.
scheduled_time_range_start=>dateadd('hour',-1,current_timestamp()),
Answers
K.
result_limit => 11,
K.
result_limit => 11,
Answers
L.
task_name=>'MYTASK') WHERE query_id IS NOT NULL);
L.
task_name=>'MYTASK') WHERE query_id IS NOT NULL);
Answers
M.
M.
Answers
N.
select *
N.
select *
Answers
O.
from table(information_schema.task_history(
O.
from table(information_schema.task_history(
Answers
P.
scheduled_time_range_start=>dateadd('hour',-1,current_timestamp()),
P.
scheduled_time_range_start=>dateadd('hour',-1,current_timestamp()),
Answers
Q.
result_limit => 10,query_id IS NOT NULL
Q.
result_limit => 10,query_id IS NOT NULL
Answers
R.
task_name=>'MYTASK'));
R.
task_name=>'MYTASK'));
Answers
S.
S.
Answers
T.
select *
T.
select *
Answers
U.
from table(information_schema.task_history(
U.
from table(information_schema.task_history(
Answers
V.
scheduled_time_range_start=>dateadd('hour',-1,current_timestamp()),
V.
scheduled_time_range_start=>dateadd('hour',-1,current_timestamp()),
Answers
W.
result_limit => 10,
W.
result_limit => 10,
Answers
X.
task_name=>'MYTASK'));
X.
task_name=>'MYTASK'));
Answers
Suggested answer: D

Explanation:

To retrieve only tasks that are completed or still running, filter the query using WHERE query_id IS NOT NULL.

Snowflake does not provide which of following set of SQL functions to support retrieving information about tasks?

A.
SYSTEM$CURRENT_USER_TASK_NAME
A.
SYSTEM$CURRENT_USER_TASK_NAME
Answers
B.
TASK_HISTORY
B.
TASK_HISTORY
Answers
C.
TASK_DEPENDENTS
C.
TASK_DEPENDENTS
Answers
D.
TASK_QUERY_HISTORY
D.
TASK_QUERY_HISTORY
Answers
E.
SYSTEMASK_DEPENDENTS_ENABLE
E.
SYSTEMASK_DEPENDENTS_ENABLE
Answers
Suggested answer: C

Explanation:

SYSTEM$CURRENT_USER_TASK_NAME

Returns the name of the task currently executing when invoked from the statement or stored procedure defined by the task.

SYSTEMASK_DEPENDENTS_ENABLE Recursively resumes all dependent tasks tied to a specified root task.

TASK_DEPENDENTS This table function returns the list of child tasks for a given root task in a DAG of tasks.

TASK_HISTORY This table function can be used to query the history of task usage within a specified date range.

Total 130 questions
Go to page: of 13