Snowflake SnowPro Advanced: Data Engineer (DEA-C02) - DEA-C02 Exam Practice Test
You have created an external table in Snowflake that points to a large dataset stored in Azure Blob Storage. The data consists of JSON files, and you've noticed that query performance is slow. Analyzing the query profile, you see that Snowflake is scanning a large number of unnecessary files. Which of the following strategies could you implement to significantly improve query performance against this external table?
Correct Answer: C,E
Vote an answer
Explanation: Only visible for PassTestking members. You can sign-up / login (it's free).
You're designing a Snowpark data transformation pipeline that requires running a Python function on each row of a large DataFrame. The Python function is computationally intensive and needs access to external libraries. Which of the following approaches will provide the BEST combination of performance, scalability, and resource utilization within the Snowpark architecture?
Correct Answer: A,D
Vote an answer
Explanation: Only visible for PassTestking members. You can sign-up / login (it's free).
You have a Snowflake table named 'CUSTOMER DATA that contains sensitive Personally Identifiable Information (PII). You need to grant a data analyst access to a subset of the data while masking specific columns containing PII. Which of the following Snowflake features, when used in combination, provides the MOST secure and efficient solution?
Correct Answer: E
Vote an answer
Explanation: Only visible for PassTestking members. You can sign-up / login (it's free).
You need to unload data from a Snowflake table named 'CUSTOMER DATA to an AWS S3 bucket The data should be unloaded in Parquet format, partitioned by the 'CUSTOMER REGION' column, and automatically compressed with GZIP. Furthermore, you only want to unload customers whose 'REGISTRATION DATE is after '2023-01-01'. Which of the following 'COPY INTO' statement correctly achieves this?


Correct Answer: A
Vote an answer
Explanation: Only visible for PassTestking members. You can sign-up / login (it's free).
You have data residing in AWS S3 in Parquet format, which is updated daily with new columns being added occasionally. The data is rarely accessed, but when it is, it needs to be queried using SQL within Snowflake. You want to minimize storage costs within Snowflake while ensuring the data can be queried without requiring manual table schema updates every time a new column is added to the S3 data'. Which approach is MOST suitable?


Correct Answer: D
Vote an answer
Explanation: Only visible for PassTestking members. You can sign-up / login (it's free).
You have a 'SALES table and a 'PRODUCTS table. The 'SALES table contains daily sales transactions, including 'SALE DATE , 'PRODUCT ID', and 'QUANTITY. The 'PRODUCTS table contains 'PRODUCT and 'CATEGORY. You need to create a materialized view to track the total quantity sold per category daily, optimized for fast query performance. You anticipate frequent updates to the 'SALES table but infrequent changes to the 'PRODUCTS table. Which of the following strategies would provide the MOST efficient materialized view implementation, considering both data freshness and query performance?
Correct Answer: C
Vote an answer
Explanation: Only visible for PassTestking members. You can sign-up / login (it's free).
A data engineering team is implementing column-level security on a Snowflake table named 'CUSTOMER DATA containing sensitive PII. They want to mask the 'EMAIL' column for users in the 'ANALYST role but allow users in the 'DATA SCIENTIST role to view the unmasked email addresses. The 'ANALYST role already has SELECT privileges on the table. Which of the following steps are necessary to achieve this using a masking policy?
Correct Answer: A,C
Vote an answer
Explanation: Only visible for PassTestking members. You can sign-up / login (it's free).
You are loading data from an S3 bucket into a Snowflake table using the COPY INTO command. The source data contains dates in various formats (e.g., 'YYYY-MM-DD', 'MM/DD/YYYY', 'DD-Mon-YYYY'). You want to ensure that all dates are loaded correctly and consistently into a DATE column in Snowflake. Which of the following COPY INTO options and commands is the MOST appropriate to handle this?
Correct Answer: A
Vote an answer
Explanation: Only visible for PassTestking members. You can sign-up / login (it's free).
A data engineer observes that a Snowflake query, used for generating a daily sales report, consistently runs slower each day, despite the dataset size remaining relatively stable. The query joins a large sales table (SALES) with a smaller product dimension table (PRODUCT) on PRODUCT ID. You've already confirmed that virtual warehouse sizing is adequate and data clustering is enabled on SALES(SALE DATE). Analyze the following scenarios and identify the MOST likely cause of the performance degradation and potential solution:
Correct Answer: C
Vote an answer
Explanation: Only visible for PassTestking members. You can sign-up / login (it's free).
You are designing a data governance strategy for a Snowflake data warehouse. One of the key requirements is to track data lineage for sensitive data, specifically Personally Identifiable Information (PII). You need to understand how PII data flows through various transformations and tables. Which Snowflake feature, when combined with appropriate tagging and metadata management practices, can BEST help you achieve this?
Correct Answer: B
Vote an answer
Explanation: Only visible for PassTestking members. You can sign-up / login (it's free).
You are tasked with building a User-Defined Aggregate Function (UDAF) in Snowflake to calculate the weighted average of product prices. The weight is determined by the quantity sold for each product. You have the following table: 'SALES (product_id INTEGER, price quantity INTEGER)'. Which of the following UDAF definitions would correctly calculate the weighted average?


Correct Answer: B
Vote an answer
Explanation: Only visible for PassTestking members. You can sign-up / login (it's free).
You accidentally truncated a large table named 'SALES DATA' in your 'REPORTING DB" database. You realize this happened 2 days ago, and your account has the default Time Travel retention of 1 day. You need to recover this table with minimal downtime. Analyze the situation and determine the best course of action, considering cost and recovery time.
Correct Answer: C
Vote an answer
Explanation: Only visible for PassTestking members. You can sign-up / login (it's free).
You have a table 'EMPLOYEE DATA' containing Personally Identifiable Information (PII), including 'salary' and 'email'. You need to implement column-level security such that: 1) The 'salary' column is only visible to users in the 'FINANCE ROLE. 2) The 'email' column is masked with a SHA256 hash for all users except those in the 'HR ROLE. You create the following masking policies:

Which of the following SQL statements correctly applies these masking policies to the 'EMPLOYEE DATA table?

Which of the following SQL statements correctly applies these masking policies to the 'EMPLOYEE DATA table?
Correct Answer: D
Vote an answer
Explanation: Only visible for PassTestking members. You can sign-up / login (it's free).
You are implementing a data pipeline to load data from AWS S3 into Snowflake. The source data consists of CSV files with a header row. Some of the CSV files have inconsistent data types in a specific column (e.g., sometimes an integer, sometimes a string). You want to use the 'COPY' command to load the data and handle these data type inconsistencies gracefully. Which of the following 'COPY' command options, used in conjunction, would BEST address this issue and avoid load failures? Assume the file format is already defined to specify CSV type, header skip, and field delimiter.


Correct Answer: E
Vote an answer
Explanation: Only visible for PassTestking members. You can sign-up / login (it's free).