COF-C02 · Question #251
What is the recommended way to change the existing file format type in my format from CSV to JSON?
The correct answer is A. ALTER FILE FORMAT my_format SET TYPE=JSON. The correct Snowflake DDL syntax to modify an existing file format is ALTER FILE FORMAT <name> SET TYPE = <format>. Option A uses this exact syntax. Options C and D reference CREATE OR REPLACE and REPLACE, which would recreate the object rather than alter it. Option B uses a…
Question
What is the recommended way to change the existing file format type in my format from CSV to JSON?
Options
- AALTER FILE FORMAT my_format SET TYPE=JSON;
- BALTER FILE FORMAT my format SWAP TYPE WITH JSON;
- CCREATE OR REPLACE FILE FORMAT my format TYPE-JSON;
- DREPLACE FILE FORMAT my format TYPE-JSON;
How the community answered
(31 responses)- A90% (28)
- C3% (1)
- D6% (2)
Explanation
The correct Snowflake DDL syntax to modify an existing file format is ALTER FILE FORMAT <name> SET TYPE = <format>. Option A uses this exact syntax. Options C and D reference CREATE OR REPLACE and REPLACE, which would recreate the object rather than alter it. Option B uses a fictional SWAP TYPE WITH clause that does not exist in Snowflake SQL.
Topics
Community Discussion
No community discussion yet for this question.