Snowflake SnowPro Core COF-C03 Practice Test Questions and Exam Dumps Part16 Q301-320

View Full Snowflake SnowPro Core COF-C03 Exam Dumps and Practice Test Dumps.

 

Question 301

Which Snowflake command is used to remove rows from a table based on a specified condition?

  1. DELETE
  2. DROP
  3. TRUNCATE
  4. REMOVE

Correct Answer: 1

Explanation

DELETE removes rows from a table based on a specified condition. A WHERE clause can be used to identify the rows that should be removed, allowing selective deletion rather than removing the entire table contents. DROP TABLE removes the table object itself, while TRUNCATE TABLE removes all rows but preserves the table structure. REMOVE is not the standard SQL command for deleting table rows. DELETE is therefore appropriate when a Snowflake user needs to remove particular records while retaining the table and its remaining data.

Question 302

Which command removes all rows from a table while preserving the table definition?

  1. DROP TABLE
  2. TRUNCATE TABLE
  3. DELETE DATABASE
  4. REMOVE TABLE

Correct Answer: 2

Explanation

TRUNCATE TABLE removes all rows from a table while preserving the table’s structure and definition. It is useful when a table needs to be emptied completely but should remain available for subsequent loading or use. DELETE can also remove rows, but it is generally used when specific rows need to be targeted through filtering conditions. DROP TABLE removes the table object itself. Therefore, TRUNCATE TABLE is the appropriate command when the objective is to clear the table contents while retaining the table structure for future operations.

Question 303

Which SQL command removes a table object and its associated data from the current database?

  1. DELETE TABLE
  2. CLEAR TABLE
  3. DROP TABLE
  4. TRUNCATE TABLE

Correct Answer: 3

Explanation

DROP TABLE removes the table object from the database along with its stored data, subject to Snowflake’s object and data-recovery features. This differs from TRUNCATE TABLE, which removes rows while retaining the table definition. DELETE removes selected rows according to a condition and does not remove the table object. DROP TABLE should therefore be used when the table itself is no longer required. Because dropping an object is more extensive than deleting rows, users should verify that the object is no longer needed before executing the command.

Question 304

Which SQL statement is used to add new rows to an existing Snowflake table?

  1. UPDATE
  2. MERGE
  3. INSERT
  4. ALTER

Correct Answer: 3

Explanation

INSERT adds new rows to an existing Snowflake table. It can insert explicitly specified values or use the results of a query to populate the target table. INSERT is therefore a fundamental DML operation for adding records to relational tables. UPDATE modifies values in existing rows, MERGE can combine insert and update logic based on matching conditions, and ALTER changes object definitions or properties. Choosing INSERT is appropriate when the requirement is specifically to create additional table rows rather than modify existing records or change the table structure.

Question 305

Which SQL statement modifies existing values in rows that satisfy a specified condition?

  1. INSERT
  2. UPDATE
  3. CREATE
  4. COPY

Correct Answer: 2

Explanation

UPDATE modifies existing rows in a Snowflake table. A SET clause specifies the values that should be changed, while an optional WHERE clause identifies which rows should be affected. Without appropriate filtering, an UPDATE can modify many or all rows, so users should carefully validate conditions before execution. INSERT adds new records, CREATE defines objects, and COPY is commonly used for loading staged files into tables. UPDATE is therefore the appropriate DML statement when existing records need their stored values changed.

Question 306

Which Snowflake feature can identify changed rows between table versions for incremental processing?

  1. Stream
  2. Stage
  3. File format
  4. Resource monitor

Correct Answer: 1

Explanation

A stream records information about changes to supported source objects, allowing downstream processes to identify inserted, updated, or deleted rows for incremental processing. This can reduce the need to repeatedly process an entire table when only a subset of records has changed. Streams are often incorporated into data pipelines with other Snowflake features that consume and process the recorded changes. Stages are used for files, file formats describe file interpretation, and Resource Monitors address credit consumption. Streams therefore provide change-tracking capabilities for incremental data workflows.

Question 307

Which SQL operation is most appropriate when records should be updated when matched and inserted when not matched?

  1. MERGE
  2. SELECT
  3. TRUNCATE
  4. DESCRIBE

Correct Answer: 1

Explanation

MERGE supports conditional synchronization between a source and target by allowing different actions for matching and nonmatching rows. A common pattern updates an existing target record when a matching key is found and inserts a new record when no match exists. This makes MERGE useful for upsert-style data pipelines and synchronization workflows. SELECT retrieves data, TRUNCATE removes all rows while retaining the table definition, and DESCRIBE provides object information. MERGE is therefore appropriate when one operation needs to handle both existing and newly arriving records.

Question 308

Which Snowflake command provides information about the columns and definition of a table?

  1. SHOW TABLES
  2. DESCRIBE TABLE
  3. LIST
  4. SHOW DATABASES

Correct Answer: 2

Explanation

DESCRIBE TABLE provides information about a table’s structure, including its columns and associated metadata. It is useful when users need to inspect the table definition before writing queries, loading data, or modifying the object. SHOW TABLES lists table objects but does not provide the same detailed column-level definition. LIST is primarily used for viewing files in stages, while SHOW DATABASES lists databases. DESCRIBE TABLE is therefore the appropriate command when the objective is to examine the structural details of a particular Snowflake table.

Question 309

Which command can display the databases available to a Snowflake user?

  1. SHOW DATABASES
  2. SHOW TABLES
  3. LIST DATABASES
  4. DESCRIBE DATABASES

Correct Answer: 1

Explanation

SHOW DATABASES lists databases that are visible to the current user according to the applicable privileges and Snowflake access rules. It is useful for discovering available databases before selecting one with the USE DATABASE command. SHOW TABLES focuses on tables, while LIST is associated with staged files rather than database discovery. DESCRIBE is generally used to inspect a specific object rather than list all databases. SHOW DATABASES is therefore appropriate when users need to identify database objects available within their Snowflake environment.

Question 310

Which command can list schemas available within a Snowflake database?

  1. SHOW SCHEMAS
  2. SHOW TABLES
  3. LIST SCHEMAS
  4. DESCRIBE SCHEMA

Correct Answer: 1

Explanation

SHOW SCHEMAS lists schemas that are visible to the current user according to the applicable permissions and context. It can be useful when exploring a database structure or determining which schema should become the current session schema. SHOW TABLES lists tables rather than schemas, while LIST is generally associated with staged files. DESCRIBE can inspect an individual object but is not the standard command for listing schemas. SHOW SCHEMAS is therefore the appropriate command for discovering schema objects available in the Snowflake environment.

Question 311

Which command can display roles that are available or visible to the current Snowflake user?

  1. SHOW ROLES
  2. LIST ROLES
  3. DESCRIBE ROLES
  4. SHOW USERS

Correct Answer: 1

Explanation

SHOW ROLES displays roles visible to the current user according to Snowflake’s authorization rules. It can be useful for reviewing the role environment and understanding which roles are available for session use or administrative investigation. SHOW USERS provides information about users instead, while LIST and DESCRIBE ROLES are not the standard commands for listing Snowflake roles in this context. Reviewing role information is an important administrative activity because privileges are generally assigned through roles and inherited according to the configured role structure.

Question 312

Which command can show the privileges granted to a particular role?

  1. SHOW GRANTS TO ROLE
  2. SHOW PRIVILEGES ROLE
  3. LIST GRANTS
  4. DESCRIBE ROLE GRANTS

Correct Answer: 1

Explanation

SHOW GRANTS TO ROLE displays privileges granted to a specified role. It can help administrators investigate why a user with that role can or cannot perform an operation and can provide visibility into object-level permissions. Privilege troubleshooting often requires checking both the role’s grants and the role relationships through which additional privileges may be inherited. Other SHOW commands can provide information about users, objects, or roles, but SHOW GRANTS TO ROLE is specifically designed to inspect grants associated with a role.

Question 313

Which Snowflake command can display warehouses visible to the current user?

  1. SHOW WAREHOUSES
  2. LIST WAREHOUSES
  3. DESCRIBE WAREHOUSES
  4. SHOW COMPUTE

Correct Answer: 1

Explanation

SHOW WAREHOUSES lists warehouses that are visible to the current user. It is useful for discovering available compute resources and reviewing warehouse-related information before selecting one for a session. The command can support administrative and operational workflows where users need to inspect existing warehouses rather than create or modify them. LIST is primarily associated with staged files, while DESCRIBE is used to inspect individual objects. SHOW COMPUTE is not the standard Snowflake command for listing warehouses. SHOW WAREHOUSES therefore provides the appropriate discovery mechanism.

Question 314

Which command can display files currently available in a Snowflake stage?

  1. SHOW FILES
  2. LIST
  3. DESCRIBE FILES
  4. SHOW STAGED_DATA

Correct Answer: 2

Explanation

LIST displays files available in a specified stage. It is useful for verifying whether expected files have arrived before loading them into a Snowflake table. Users can use LIST with appropriate stage references to inspect staged-file information and support troubleshooting of ingestion workflows. SHOW commands are commonly used to list Snowflake objects such as databases, schemas, tables, roles, and warehouses, but LIST is the standard command for staged files. This makes LIST particularly useful when validating file-based data-ingestion processes.

Question 315

Which Snowflake object provides a reusable named definition for parsing staged CSV or similar files?

  1. File format
  2. Stream
  3. Task
  4. Role

Correct Answer: 1

Explanation

A file format is a reusable Snowflake object containing settings that describe how staged files should be interpreted. For delimited files, these settings can include delimiters, header handling, escaping, compression, and related parsing behavior. Reusing a file format can provide consistency across multiple COPY INTO operations and reduce duplicated configuration. A stream tracks data changes, a task schedules or executes SQL workflows, and a role manages privileges. A file format is therefore the appropriate object when the requirement is to define and reuse file-parsing rules.

Question 316

Which file format option specifies the character used to separate fields in a delimited file?

  1. RECORD_DELIMITER
  2. FIELD_DELIMITER
  3. SKIP_HEADER
  4. NULL_IF

Correct Answer: 2

Explanation

FIELD_DELIMITER specifies the character or sequence used to separate fields in supported delimited files. For example, a comma can separate columns in a conventional CSV file, while another delimiter can be used for tabular text formats. RECORD_DELIMITER serves a different purpose by identifying record boundaries. SKIP_HEADER controls how many initial rows are skipped, and NULL_IF identifies strings that should be interpreted as NULL. FIELD_DELIMITER is therefore the file-format setting that directly controls how individual fields are separated during parsing.

Question 317

Which file format option identifies the delimiter separating records in a delimited file?

  1. FIELD_DELIMITER
  2. NULL_IF
  3. RECORD_DELIMITER
  4. SKIP_HEADER

Correct Answer: 3

Explanation

RECORD_DELIMITER specifies the character or sequence used to separate records in supported delimited files. This tells Snowflake where one record ends and another begins during file parsing. FIELD_DELIMITER instead separates individual fields within a record. SKIP_HEADER determines how many leading rows are ignored, while NULL_IF controls which values are interpreted as NULL. Correctly configuring record and field delimiters is important when ingesting text files because incorrect parsing settings can cause rows or columns to be interpreted incorrectly.

Question 318

Which file format option specifies strings that should be interpreted as NULL during data loading?

  1. NULL_IF
  2. FIELD_DELIMITER
  3. RECORD_DELIMITER
  4. COMPRESSION

Correct Answer: 1

Explanation

NULL_IF specifies one or more strings that Snowflake should interpret as NULL when loading supported files. This can be useful when source systems represent missing values using a specific token instead of an actual database NULL. For example, an ingestion process may encounter a designated placeholder that should become NULL in the target table. FIELD_DELIMITER and RECORD_DELIMITER control file structure, while COMPRESSION describes how compressed input is handled. NULL_IF therefore focuses specifically on translating designated source representations into SQL NULL values during loading.

Question 319

Which file format option allows a field to be enclosed by a specified character such as a quotation mark?

  1. SKIP_HEADER
  2. FIELD_DELIMITER
  3. FIELD_OPTIONALLY_ENCLOSED_BY
  4. NULL_IF

Correct Answer: 3

Explanation

FIELD_OPTIONALLY_ENCLOSED_BY specifies a character that may surround field values in supported delimited files. Quotation marks are a common example, especially when fields contain delimiters or other characters that could otherwise interfere with parsing. The option helps Snowflake interpret field boundaries correctly during data loading. SKIP_HEADER handles leading rows, FIELD_DELIMITER defines separators between fields, and NULL_IF identifies strings representing NULL. FIELD_OPTIONALLY_ENCLOSED_BY is therefore useful when source files use optional quoting around individual field values.

Question 320

Which Snowflake command can change the name of an existing table without recreating it?

  1. RENAME TABLE
  2. ALTER TABLE … RENAME TO
  3. MODIFY TABLE NAME
  4. CHANGE TABLE

Correct Answer: 2

Explanation

ALTER TABLE … RENAME TO changes the name of an existing Snowflake table. Renaming an object changes its identifier while retaining the table and its underlying data rather than requiring users to recreate the object. This can be useful when correcting naming conventions, reorganizing database objects, or preparing tables for a revised naming scheme. DROP and CREATE would represent a different approach and could introduce unnecessary object-management consequences. ALTER TABLE is therefore the appropriate command family for renaming an existing table.