Month End Special 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: save70

SnowPro Core Certification COF-C02 Book

Page: 46 / 62
Total 820 questions

SnowPro Core Certification Exam Questions and Answers

Question 181

What is the benefit of using the STRIP_OUTER_ARRAY parameter with the COPY INTO

command when loading data from a JSON file into a table?

Options:

A.

It flattens multiple arrays into a single array.

B.

It removes the outer array structure and loads separate rows of data

C.

It transforms a pivoted table into an array.

D.

It tokenizes each data string using the defined delimiters.

command is used when loading data from a JSON file into a table. This parameter removes the outer array structure from the JSON data and loads separate rows of data into the table.

    Understanding the STRIP_OUTER_ARRAY Parameter:

      JSON files often contain data in an array format where multiple records are nested within a single outer array.

      The STRIP_OUTER_ARRAY parameter helps in simplifying the loading process by removing this outer array, allowing each element within the array to be loaded as a separate row in the target table.

    How It Works:

      When the STRIP_OUTER_ARRAY parameter is set to TRUE, Snowflake treats each item within the outer array as an individual record.

      This eliminates the need for additional parsing or transformation steps that would otherwise be required to handle nested arrays.

    Example Usage:

FROM @my_stage/file.json

FILE_FORMAT = (TYPE = 'JSON' STRIP_OUTER_ARRAY = TRUE);

      In this example, the JSON file containing an array of objects is loaded into the table my_table.

      Each object within the array is loaded as a separate row, without the outer array structure.

    Benefits:

      Simplifies data loading: By removing the outer array, the data is directly loaded into the table without additional manipulation.

      Enhances performance: Streamlines the loading process, reducing the complexity and potential errors in handling nested JSON structures.

References:

    Snowflake Documentation: COPY INTO

Snowflake Documentation: JSON File Format Options

Question 182

A Snowflake user wants to optimize performance for a query that queries only a small number of rows in a table. The rows require significant processing. The data in the table does not change frequently.

What should the user do?

Options:

A.

Add a clustering key to the table.

B.

Add the search optimization service to the table.

C.

Create a materialized view based on the query.

D.

Enable the query acceleration service for the virtual warehouse.

Question 183

Which database objects can be shared with Secure Data Sharing? (Select TWO).

Options:

A.

Views

B.

Materialized views

C.

External stages

D.

External tables

E.

Dynamic tables

Question 184

Which Snowflake feature or tool helps troubleshoot issues in SQL query expressions that commonly cause performance bottlenecks?

Options:

A.

Persisted query results

B.

QUERY_HISTORY View

C.

Query acceleration service

D.

Query Profile

Page: 46 / 62
Total 820 questions