ExamGecko
Home Home / Snowflake / DEA-C01

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

Question list
Search
Search

List of questions

Search

For enabling non-ACCOUNTADMIN Roles to Perform Data Sharing Tasks, which two glob-al/account privileges snowflake provide?

A.
CREATE SHARE
A.
CREATE SHARE
Answers
B.
IMPORT SHARE
B.
IMPORT SHARE
Answers
C.
REFERENCE USAGE
C.
REFERENCE USAGE
Answers
D.
OPERATE
D.
OPERATE
Answers
Suggested answer: A, B

Explanation:

CREATE SHARE

In a provider account, this privilege enables creating and managing shares (for sharing data with consumer accounts).

IMPORT SHARE

In a consumer account, this privilege enables viewing the inbound shares shared with the account.

Also enables creating databases from inbound shares; requires the global CREATE DATABASE privilege.

By default, these privileges are granted only to the ACCOUNTADMIN role, ensuring that only ac-count administrators can perform these tasks. However, the privileges can be granted to other roles, enabling the tasks to be delegated to other users in the account.

Mark the correct Statements with respect to Secure views & its creation in the SnowFlake Account?

A.
For a secure view, internal optimizations can indirectly expose data & the view defini-tion is visible to other users.
A.
For a secure view, internal optimizations can indirectly expose data & the view defini-tion is visible to other users.
Answers
B.
Secure views should not be used for views that are defined solely for query conven-ience, such as views created to simplify queries for which users do not need to under-stand the underlying data representation.
B.
Secure views should not be used for views that are defined solely for query conven-ience, such as views created to simplify queries for which users do not need to under-stand the underlying data representation.
Answers
C.
To convert an existing view to a secure view and back to a regular view, set/unset the SECURE keyword in the ALTER VIEW or ALTER MATERIALIZED VIEW com-mand.
C.
To convert an existing view to a secure view and back to a regular view, set/unset the SECURE keyword in the ALTER VIEW or ALTER MATERIALIZED VIEW com-mand.
Answers
D.
For non-materialized views, the IS_SECURE column in the Information Schema and Account Usage views identifies whether a view is secure.
D.
For non-materialized views, the IS_SECURE column in the Information Schema and Account Usage views identifies whether a view is secure.
Answers
E.
The internals of a secure view are not exposed in Query Profile (in the web interface). This is the case even for the owner of the secure view, because non-owners might have access to an owner'sQuery Profile.
E.
The internals of a secure view are not exposed in Query Profile (in the web interface). This is the case even for the owner of the secure view, because non-owners might have access to an owner'sQuery Profile.
Answers
Suggested answer: B, C, D, E

Explanation:

Why Should I Use Secure Views?

For a non-secure view, internal optimizations can indirectly expose data.

Some of the internal optimizations for views require access to the underlying data in the base tables for the view. This access might allow data that is hidden from users of the view to be exposed through user code, such as user-defined functions, or other programmatic methods. Secure views do not utilize these optimizations, ensuring that users have no access to the underlying data.

For a non-secure view, the view definition is visible to other users.

By default, the query expression used to create a standard view, also known as the view definition or text, is visible to users in various commands and interfaces.

For security or privacy reasons, you might not wish to expose the underlying tables or internal structural details for a view. With secure views, the view definition and details are visible only to authorized users (i.e. users who are granted the role that owns the view).

When Should I Use a Secure View?

Views should be defined as secure when they are specifically designated for data privacy (i.e. to limit access to sensitive data that should not be exposed to all users of the underlying table(s)).

Secure views should not be used for views that are defined solely for query convenience, such as views created to simplify queries for which users do not need to understand the underlying data representation. Secure views can execute more slowly than non-secure views.

Secure views are defined using the SECURE keyword with the standard DDL for views:

To create a secure view, specify the SECURE keyword in the CREATE VIEW or CREATE MA-TERIALIZED VIEW command.

To convert an existing view to a secure view and back to a regular view, set/unset the SECURE keyword in the ALTER VIEW or ALTER MATERIALIZED VIEW command.

The definition of a secure view is only exposed to authorized users (i.e. users who have been granted the role that owns the view). If an unauthorized user uses any of the following commands or in-terfaces, the view definition is not displayed:

· SHOW VIEWS and SHOW MATERIALIZED VIEWS commands.

· GET_DDL utility function.

· VIEWS Information Schema view.

· VIEWS Account Usage view.

For non-materialized views, the IS_SECURE column in the Information Schema and Account Us-age views identifies whether a view is secure.

The internals of a secure view are not exposed in Query Profile (in the web interface). This is the case even for the owner of the secure view, because non-owners might have access to an owner's Query Profile.

When using the CURRENT_ROLE and CURRENT_USER functions with secure views that will be shared to other Snowflake accounts, Snowflake returns a NULL value for these functions?

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

Explanation:

When using the CURRENT_ROLE and CURRENT_USER functions with secure views that will be shared to other Snowflake accounts, Snowflake returns a NULL value for these functions. The reason is that the owner of the data being shared does not typically control the users or roles in the account with which the view is being shared.

Snowflake computes and adds partitions based on the defined partition column expressions when an external table metadata is refreshed.

What are the Correct Statements to configure Partition metadata refresh in case of External Tables?

A.
By default, the metadata is refreshed automatically when the object is created.
A.
By default, the metadata is refreshed automatically when the object is created.
Answers
B.
The object owner can configure the metadata to refresh automatically when new or updated data files are available in the external stage.
B.
The object owner can configure the metadata to refresh automatically when new or updated data files are available in the external stage.
Answers
C.
Metadata refresh is not required as its Managed implicitly by Snowflake.
C.
Metadata refresh is not required as its Managed implicitly by Snowflake.
Answers
D.
Partitions of External tables is managed by External Stage Cloud provider.
D.
Partitions of External tables is managed by External Stage Cloud provider.
Answers
E.
There is nothing like adding partitions on External tables.
E.
There is nothing like adding partitions on External tables.
Answers
Suggested answer: A, B

Explanation:

Snowflake strongly recommend partitioning your external tables, which requires that your underlying data is organized using logical paths that include date, time, country, or similar dimensions in the path.

Partitioning divides your external table data into multiple parts using partition columns.

An external table definition can include multiple partition columns, which impose a multidimensional structure on the external data.

Partitions are stored in the external table metadata.

Benefits of partitioning include improved query performance.

Because the external data is partitioned into separate slices/parts, query response time is faster when processing a small part of the data instead of scanning the entire data set.

Based on your individual use cases, you can either:

· Add new partitions automatically by refreshing an external table that defines an expression for each partition column.

· Add new partitions manually.

Partition columns are defined when an external table is created, using the CREATE EXTERNAL TABLE … PARTITION BY syntax.

After an external table is created, the method by which partitions are added cannot be changed.

Partitions Added Automatically

An external table creator defines partition columns in a new external table as expressions that parse the path and/or filename information stored in the METADATA$FILENAME pseudocolumn.

A partition consists of all data files that match the path and/or filename in the expression for the partition column.

The CREATE EXTERNAL TABLE syntax for adding partitions automatically based on expres-sions is as follows:

CREATE EXTERNAL TABLE

<table_name>

( <part_col_name> <col_type> AS <part_expr> )

[ , ... ]

[ PARTITION BY ( <part_col_name> [, <part_col_name> ... ] ) ]

..

Snowflake computes and adds partitions based on the defined partition column expressions when an external table metadata is refreshed.

By default, the metadata is refreshed automatically when the object is created.

In addition, the object owner can configure the metadata to refresh automatically when new or updated data files are available in the external stage.

The owner can alternatively refresh the metadata manually by executing the ALTER EXTERNAL TABLE … REFRESH command.

The metadata for an external table can be refreshed automatically using the event notification service for your cloud storage service.

PARTITION_TYPE = USER_SPECIFIED must be used when you prefer to add and remove par-titions selectively rather than automatically adding partitions for all new files in an external storage location that match an expression?

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

Explanation:

The CREATE EXTERNAL TABLE syntax for manually added partitions is as follows:

1. CREATE EXTERNAL TABLE

2. <table_name>

3. ( <part_col_name> <col_type> AS <part_expr> )

4. [ , ... ]

5. [ PARTITION BY ( <part_col_name> [, <part_col_name> ... ] ) ]

6. PARTITION_TYPE = USER_SPECIFIED

..

Included the required PARTITION_TYPE = USER_SPECIFIED parameter.

Which Scenario Data engineer decide Materialized views are not useful. Select All that apply.

A.
Query results contain a small number of rows and/or columns relative to the base table (the table on which the view is defined).
A.
Query results contain a small number of rows and/or columns relative to the base table (the table on which the view is defined).
Answers
B.
Query results contain results that require significant processing.
B.
Query results contain results that require significant processing.
Answers
C.
The query is on an external table (i.e. data sets stored in files in an external stage), which might have slower performance compared to querying native database tables.
C.
The query is on an external table (i.e. data sets stored in files in an external stage), which might have slower performance compared to querying native database tables.
Answers
D.
The view's base table change frequently.
D.
The view's base table change frequently.
Answers
Suggested answer: D

Explanation:

A materialized view is a pre-computed data set derived from a query specification (the SELECT in the view definition) and stored for later use. Because the data is pre-computed, querying a material-ized view is faster than executing a query against the base table of the view. This performance dif-ference can be significant when a query is run frequently or is sufficiently complex. As a result, ma-terialized views can speed up expensive aggregation, projection, and selection operations, especially those that run frequently and that run on large data sets.

Materialized views require Enterprise Edition.

Materialized views are designed to improve query performance for workloads composed of common, repeated query patterns. However, materializing intermediate results incurs additional costs.

As such, before creating any materialized views, you should consider whether the costs are offset by the savings from re-using these results frequently enough.

Materialized views are particularly useful when:

· Query results contain a small number of rows and/or columns relative to the base table (the table on which the view is defined).

· Query results contain results that require significant processing, including:

1. Analysis of semi-structured data.

2. Aggregates that take a long time to calculate.

· The query is on an external table (i.e. data sets stored in files in an external stage), which might have slower performance compared to querying native database tables.

The view's base table does not change frequently.

Partition columns optimize query performance by pruning out the data files that do not need to be scanned (i.e. partitioning the external table). Which pseudocolumn of External table evaluate as an expression that parses the path and/or filename information.

A.
METADATA$ROW_NUMBER
A.
METADATA$ROW_NUMBER
Answers
B.
METADATA$COLUMNNAME
B.
METADATA$COLUMNNAME
Answers
C.
METADATA$FILEPATH
C.
METADATA$FILEPATH
Answers
D.
METADATA$FILENAME
D.
METADATA$FILENAME
Answers
Suggested answer: D

Explanation:

METADATA$FILENAME

A pseudocolumn that identifies the name of each staged data file included in the external table, including its path in the stage.

An external table creator defines partition columns in a new external table as expressions that parse the path and/or filename information stored in the METADATA$FILENAME pseudocolumn. A partition consists of all data files that match the path and/or filename in the expression for the parti-tion column.

Data Engineer identified use case where he decided to use materialized view for query performance.

Which one is not the limitation he must be aware of before using MVs in their use case?

A.
Truncating a materialized view is not supported.
A.
Truncating a materialized view is not supported.
Answers
B.
Time Travel is not currently supported on materialized views.
B.
Time Travel is not currently supported on materialized views.
Answers
C.
You cannot directly clone a materialized view by using the CREATE MATERIAL-IZED VIEW ...CLONE... command.
C.
You cannot directly clone a materialized view by using the CREATE MATERIAL-IZED VIEW ...CLONE... command.
Answers
D.
A materialized view can query only a single table & Joins, including self-joins, are not supported.
D.
A materialized view can query only a single table & Joins, including self-joins, are not supported.
Answers
E.
A materialized views does not support clustering.
E.
A materialized views does not support clustering.
Answers
F.
A materialized views cannot be created on Shared Data.
F.
A materialized views cannot be created on Shared Data.
Answers
G.
A materialized view cannot include HAVING clauses OR ORDER BY clause.
G.
A materialized view cannot include HAVING clauses OR ORDER BY clause.
Answers
H.
Context Functions like CURRENT_TIME or CURRENT_TIMESTAMP is not per-mitted.
H.
Context Functions like CURRENT_TIME or CURRENT_TIMESTAMP is not per-mitted.
Answers
Suggested answer: E, G

Explanation:

Defining a clustering key on a materialized view is supported and can increase performance in many situations. However, it also adds costs.

If you cluster both the materialized view(s) and the base table on which the materialized view(s) are defined, you can cluster the materialized view(s) on different columns from the columns used to cluster the base table.

You can create a materialized view on shared data.

Also You can use Snowflake's data sharing feature to share a materialized view.

Rest all are correct.

Alex, a Data Engineer with one of the Data analytics Organization, created the Materialized view over External tables to improve Data Reporting Experience.

Step 1: He created materialized view named DataReportMV

A.
create or replace materialized view DataReportMV as
A.
create or replace materialized view DataReportMV as
Answers
B.
select Item_id, Item_price from Items; Step 2: He joined a materialized view with a sales table as
B.
select Item_id, Item_price from Items; Step 2: He joined a materialized view with a sales table as
Answers
C.
create or replace view Revenue as
C.
create or replace view Revenue as
Answers
D.
select m.item_id, sum(ifnull(s.quantity, 0)) as quantity,
D.
select m.item_id, sum(ifnull(s.quantity, 0)) as quantity,
Answers
E.
sum(ifnull(quantity * (s.price - m.item_price), 0)) as profit
E.
sum(ifnull(quantity * (s.price - m.item_price), 0)) as profit
Answers
F.
from DataReportMV as m left outer join sales as s on s.item_id = m.item_id
F.
from DataReportMV as m left outer join sales as s on s.item_id = m.item_id
Answers
G.
group by m.item_id;Step 3: After 1 hour, he decided to temporarily suspend the use (and maintenance) of the DataReportMV materialized view for cost saving purpose.alter materialized view DataReportMV suspend; Please select what Alex is doing wrong here?
G.
group by m.item_id;Step 3: After 1 hour, he decided to temporarily suspend the use (and maintenance) of the DataReportMV materialized view for cost saving purpose.alter materialized view DataReportMV suspend; Please select what Alex is doing wrong here?
Answers
H.
A materialized view, DataReportMV does not support Join operations, so Step 2 would be failed & he cannot proceed further.
H.
A materialized view, DataReportMV does not support Join operations, so Step 2 would be failed & he cannot proceed further.
Answers
I.
Materialized view on top of External tables is not supported feature.
I.
Materialized view on top of External tables is not supported feature.
Answers
J.
Once DataReportMV got suspended , any query on the top of the view will generate er-ror like:Failure during expansion of view 'DATAREPORTMV': SQL compilation error: Material-ized view DataReportMV is invalid.
J.
Once DataReportMV got suspended , any query on the top of the view will generate er-ror like:Failure during expansion of view 'DATAREPORTMV': SQL compilation error: Material-ized view DataReportMV is invalid.
Answers
K.
There is no command like suspend for temporarily suspension of Materialized views, Step 3 will give error like invalid Suspend command.
K.
There is no command like suspend for temporarily suspension of Materialized views, Step 3 will give error like invalid Suspend command.
Answers
L.
Alex is doing everything correct.
L.
Alex is doing everything correct.
Answers
Suggested answer: E

Explanation:

All Steps will be executed successfully by Alex without any error.

David, a Lead Data engineer with XYZ company looking out to improve query performance & oth-er benefits while working with Tables, Regular Views, MVs and Cached Results.

Which one of the following does not shows key similarities and differences between tables, regular views, cached query results, and materialized views while choosing any of them by David?

A.
Regular views do not cache data, and therefore cannot improve performance by cach-ing.
A.
Regular views do not cache data, and therefore cannot improve performance by cach-ing.
Answers
B.
As with non-materialized views, a materialized view automatically inherits the privileges of its base table.
B.
As with non-materialized views, a materialized view automatically inherits the privileges of its base table.
Answers
C.
Cached Query Results: Used only if data has not changed and if query only uses de-terministic functions (e.g. not CURRENT_DATE).
C.
Cached Query Results: Used only if data has not changed and if query only uses de-terministic functions (e.g. not CURRENT_DATE).
Answers
D.
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.
D.
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
E.
Both materialized views and regular views enhance data security by allowing data to be exposed or hidden at the row level or column level.
E.
Both materialized views and regular views enhance data security by allowing data to be exposed or hidden at the row level or column level.
Answers
Suggested answer: B

Explanation:

Materialized Views, like other database objects (tables, views, UDFs, etc.), are owned by a role and have privileges that can be granted to other roles.

You can grant the following privileges on a materialized view:

SELECT

As with non-materialized views, a materialized view does not automatically inherit the privileges of its base table. You should explicitly grant privileges on the materialized view to the roles that should use that view.

As with non-materialized views, a user who wishes to access a materialized view needs privileges only on the view, not on the underlying object(s) that the view references.

Rest is correct.

Total 130 questions
Go to page: of 13