


















































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!



















































































Question 1. Which Snowflake feature allows continuous loading of streaming data without manual intervention? A) Snowpipe B) Snowflake Tasks C) Snowflake Streams D) Snowflake Stages Answer: A Explanation: Snowpipe automatically loads data files as soon as they appear in a stage, enabling near‑real‑time ingestion. Question 2. When profiling a table in Snowflake, which command quickly returns column statistics such as number of distinct values and null count? A) DESCRIBE TABLE B) ANALYZE TABLE C) SELECT COUNT(*) FROM … D) SHOW COLUMNS Answer: B Explanation: ANALYZE TABLE gathers column statistics used by the optimizer for better query plans. Question 3. Which of the following Snowflake data types is best suited for storing geographic coordinates? A) VARIANT B) GEOGRAPHY C) OBJECT D) BINARY Answer: B
Explanation: The GEOGRAPHY data type stores spatial data and supports geospatial functions. Question 4. In Snowflake, which constraint type is NOT enforced by the engine but can be used for documentation? A) PRIMARY KEY B) UNIQUE C) FOREIGN KEY D) NOT NULL Answer: C Explanation: Snowflake records foreign key definitions for metadata purposes but does not enforce referential integrity. Question 5. Which Snowflake object is used to schedule recurring SQL statements without an external scheduler? A) Tasks B) Streams C) Pipes D) Procedures Answer: A Explanation: Tasks run SQL statements on a defined schedule or when triggered by other tasks. Question 6. To share a dataset with an external Snowflake account without copying data, you would use: A) External tables B) Data sharing (shares) C) Snowpipe
Answer: A Explanation: The FILE_FORMAT parameter defines the format details for the COPY operation. Question 10. Which window function returns the cumulative sum of a column ordered by a date column? A) RANK() B) SUM() OVER (ORDER BY date) C) LAG() D) NTILE() Answer: B Explanation: SUM() used as a window function with ORDER BY produces a running total. Question 11. What is the primary advantage of using the Parquet file format for loading data into Snowflake? A) Human readability B) Row‑level encryption C) Columnar storage with efficient compression D) Supports only JSON data Answer: C Explanation: Parquet stores data column‑wise, enabling high compression and faster column scans.
Question 12. Which Snowflake object is best for pre‑computing and storing results of a frequently run aggregation? A) View B) Materialized View C) Table D) Stage Answer: B Explanation: Materialized Views cache results and automatically refresh, improving query performance. Question 13. To enforce row‑level security based on a user's department, you would implement: A) Column masking policy B) Row Access Policy C) Role hierarchy D) Secure view only Answer: B Explanation: Row Access Policies filter rows returned to a user based on expression logic. Question 14. Which of the following is NOT a valid type of join in Snowflake? A) INNER JOIN B) LEFT OUTER JOIN C) CROSS JOIN D) ASOF JOIN Answer: D Explanation: ASOF JOIN is a feature of other platforms (e.g., Snowflake does not support it natively).
Explanation: CURRENT_WAREHOUSE() provides the name of the active virtual warehouse. Question 18. To improve query performance on a large fact table filtered frequently by a date column, you would: A) Add a primary key on the date column B) Create a clustering key on the date column C) Create a view that selects only recent rows D) Use a stored procedure to pre‑filter data Answer: B Explanation: Clustering organizes micro‑partitions on the date column, reducing scan size. Question 19. Which Snowflake feature provides a result cache that can serve identical queries without re‑execution? A) Metadata cache B) Result cache C) Warehouse cache D) Query cache Answer: B Explanation: The Result Cache stores query results for 24 hours and serves identical queries instantly. Question 20. Which statement correctly describes a Snowflake Secure View? A) It encrypts the underlying data at rest. B) It hides the view definition from non‑owner roles. C) It automatically materializes the view. D) It bypasses row‑access policies.
Answer: B Explanation: Secure Views conceal the view’s query text from users without the OWNERSHIP privilege. Question 21. When using Snowflake Streams, what does the “offset” column represent? A) The position of the row in the source file B) The timestamp when the row was inserted C) The change type (INSERT, DELETE, UPDATE) D) The micro‑partition offset for CDC tracking Answer: D Explanation: The offset column tracks changes within micro‑partitions for change data capture. Question 22. Which function can be used to parse a string containing JSON into a VARIANT? A) TO_JSON() B) PARSE_JSON() C) JSON_EXTRACT() D) CAST(... AS VARIANT) Answer: B Explanation: PARSE_JSON converts a JSON‑formatted string into a VARIANT for further manipulation. Question 23. In a Snowflake data model, which schema design is most suitable for ad‑hoc analytics across many dimensions? A) Star schema B) Snowflake schema C) Normalized 3NF schema
Answer: A Explanation: SIZEOF returns the storage size of a VARIANT, ARRAY, or OBJECT. Question 27. When loading semi‑structured data, which Snowflake feature automatically infers the schema? A) Auto‑detect file format B) COPY INTO with FILE_FORMAT = (TYPE='JSON') C) Snowpipe auto‑schema detection D) VARIANT column with PARSE_JSON Answer: D Explanation: Storing JSON in a VARIANT column allows schema‑on‑read; PARSE_JSON parses the structure. Question 28. Which of the following is a valid way to create a user‑defined scalar function in Snowflake using JavaScript? A) CREATE FUNCTION my_func(x NUMBER) RETURNS NUMBER LANGUAGE JAVASCRIPT AS $$ return x2; $$; B) CREATE FUNCTION my_func(x NUMBER) RETURNS NUMBER AS $$ return x2; $$; C) CREATE FUNCTION my_func(x NUMBER) RETURNS NUMBER LANGUAGE SQL AS $$ SELECT x2; $$; D) CREATE FUNCTION my_func(x NUMBER) RETURNS NUMBER HANDLER JAVASCRIPT $$ return x2; $$; Answer: A Explanation: The correct syntax specifies LANGUAGE JAVASCRIPT and provides a JavaScript body. Question 29. Which Snowflake SQL clause would you use to remove duplicate rows from a result set?
Answer: A Explanation: DISTINCT eliminates duplicate rows in the SELECT output. Question 30. To enforce that a column never contains null values, you would define it as: A) NOT NULL B) UNIQUE C) PRIMARY KEY D) CHECK (col IS NOT NULL) Answer: A Explanation: NOT NULL constraint prevents null entries in the column. Question 31. Which Snowflake function can be used to calculate the percentile rank of a value within a column? A) PERCENT_RANK() B) PERCENTILE_CONT() C) CUME_DIST() D) RANK() Answer: A Explanation: PERCENT_RANK() returns the relative rank of a row as a percentage.
Question 35. Which Snowflake system-defined role has the highest level of privileges? A) ACCOUNTADMIN B) SECURITYADMIN C) SYSADMIN D) USERADMIN Answer: A Explanation: ACCOUNTADMIN can manage all account‑level objects and roles. Question 36. To create a mask that hides the first six digits of a credit‑card number, you would use: A) CREATE MASKING POLICY … RETURN LEFT($1,6)||'******'; B) CREATE MASKING POLICY … RETURN REPLACE($1,1,6,''); C) CREATE MASKING POLICY … RETURN SUBSTR($1,7); D) CREATE MASKING POLICY … RETURN CONCAT('******',RIGHT($1,4)); Answer: D Explanation: Masking policies can concatenate masked and visible portions; option D masks first six digits. Question 37. Which Snowflake function can be used to generate a random integer between 1 and 100? A) RANDOM(1,100) B) UNIFORM(1,100,0) C) RANDINT(1,100) D) FLOOR(RANDOM()100)+ Answer: D
Explanation: RANDOM() returns a float; scaling and flooring yields an integer in the desired range. Question 38. Which of the following is true about Snowflake’s “zero‑copy cloning”? A) It creates a full physical copy of the data. B) It consumes additional storage equal to the size of the source. C) It shares the same underlying micro‑partitions until changes are made. D) It can only be used for tables, not schemas. Answer: C Explanation: Clones share storage with the source and diverge only when modifications occur. Question 39. In a Snowflake data pipeline, which component captures change data from a source table? A) Snowpipe B) Streams C) Tasks D) Stages Answer: B Explanation: Streams track DML changes for CDC processing. Question 40. Which Snowflake function can be used to convert a TIMESTAMP to a different time zone? A) CONVERT_TIMEZONE() B) TO_TIMEZONE() C) AT TIME ZONE D) SHIFT_TIMEZONE()
Answer: A Explanation: TEMPORARY tables are dropped automatically at session end. Question 44. Which of the following best describes a “Transitive” schema in Snowflake? A) A schema that inherits from another schema. B) A schema used for staging data before loading. C) A schema that contains only transient tables. D) Snowflake does not have a “Transitive” schema concept. Answer: D Explanation: Snowflake uses “Transient” tables, not “Transitive” schemas. Question 45. Which Snowflake function can be used to extract the year component from a DATE column? A) YEAR() B) EXTRACT(YEAR FROM date_col) C) DATE_PART('YEAR', date_col) D) All of the above Answer: D Explanation: All three syntaxes are valid for extracting the year. Question 46. When you need to join a large fact table with a small dimension table, which join type typically offers the best performance? A) LEFT OUTER JOIN
Answer: C Explanation: INNER JOIN avoids unnecessary row duplication and is usually fastest when both sides have matching keys. Question 47. Which Snowflake SQL clause can be used to rename a column in a table without recreating the table? A) ALTER TABLE … RENAME COLUMN … B) ALTER TABLE … MODIFY COLUMN … C) ALTER TABLE … CHANGE COLUMN … D) ALTER TABLE … SET COLUMN NAME … Answer: A Explanation: ALTER TABLE … RENAME COLUMN changes the column name directly. Question 48. Which Snowflake built‑in function can be used to detect the data type of a VARIANT value? A) TYPEOF() B) IS_VARIANT() C) VARIANT_TYPE() D) DATA_TYPE() Answer: A Explanation: TYPEOF returns the underlying type (e.g., STRING, ARRAY) of a VARIANT.
Explanation: The window frame syntax defines a 7‑row moving window. Question 52. When using Snowpark to write data transformations in Python, which object represents a DataFrame? A) SnowparkTable B) DataFrame C) SnowparkDataFrame D) SnowflakeDF Answer: C Explanation: Snowpark’s Python API uses SnowparkDataFrame for tabular data. Question 53. Which Snowflake function returns the number of rows affected by the last DML statement? A) ROW_COUNT() B) RESULT_SCAN(LAST_QUERY_ID()) C) GET_DML_STATUS() D) SYSTEM$QUERY_RESULT_ROWS() Answer: B Explanation: RESULT_SCAN with LAST_QUERY_ID can be queried to see the row count. Question 54. Which Snowflake object type can be used to store reusable SQL logic that can be referenced in multiple queries? A) View B) Procedure C) Function
D) All of the above Answer: D Explanation: Views, stored procedures, and UDFs all encapsulate reusable logic. Question 55. To monitor the execution time and resource usage of a specific query, you would query which Snowflake view? A) INFORMATION_SCHEMA.QUERY_HISTORY B) ACCOUNT_USAGE.QUERY_STATS C) SNOWFLAKE.ACCOUNT_USAGE.QUERY_HISTORY D) Both A and C (they are synonyms) Answer: D Explanation: Both INFORMATION_SCHEMA.QUERY_HISTORY and ACCOUNT_USAGE.QUERY_HISTORY provide query metrics. Question 56. Which Snowflake feature enables you to define a table that is automatically refreshed from an external source on a schedule? A) External Table with AUTO_REFRESH B) Snowpipe C) Materialized View D) Stream Answer: A Explanation: External tables can be set with AUTO_REFRESH to sync with the source. Question 57. Which Snowflake command is used to permanently delete a table and all its data? A) DROP TABLE table_name;