COF-C02 practice question 34 of 35
When unloading data, which file format preserves the data values for floating-point number columns?
Full set: 778 questionsParquet is a binary, columnar file format that stores data types in their native representation. When unloading data from Snowflake, Parquet preserves the exact precision of floating-point numbers (e.g., FLOAT, DOUBLE) without requiring explicit casting or special handling. Text-based formats like CSV and JSON convert numbers to their string representations, which can result in a loss of precision. Snowflake's official documentation explicitly recommends using the Parquet file format to ensure the fidelity of floating-point data during unloading operations.
A. Avro: While Avro is a binary format that can preserve precision, Snowflake's documentation specifically and prominently recommends Parquet for maintaining floating-point precision during unloading.
B. CSV: As a text-based format, CSV represents numbers as strings. This conversion process can lead to rounding or truncation, causing a loss of floating-point precision.
C. JSON: Similar to CSV, JSON is a text-based format. Unloading numeric data to JSON involves converting it to a string representation, which risks the loss of exact precision.
1. Snowflake Documentation: Preparing to Unload Data. Under the section Floating-point Numbers
the documentation states: "To preserve the exact precision of floating-point numbers when unloading data
we recommend using the Parquet file format. When unloading to other file formats (CSV
JSON
etc.)
if you need to preserve the precision of the floating-point numbers
we recommend explicitly casting the floating-point number columns to strings in the SELECT statement."
Link to Source
2. Snowflake Documentation: Summary of Data Type Mapping for Unloading. This table shows that Snowflake FLOAT data types are converted to Parquet DOUBLE (a native binary floating-point type)
whereas for CSV and JSON
they are converted to their string representations.
Link to Source
Keep practicing
Take the free COF-C02 practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other COF-C02 practice questions
- Question 1What does Snowflake recommend regarding database object ownership? (Select TWO).
- Question 2What kind of value does a User-Defined Function (UDF) return? (Select TWO).
- Question 3How do Snowflake data providers share data that resides in different databases?
- Question 4What are supported file formats for unloading data from Snowflake? (Choose three.)
- Question 5A marketing co-worker has requested the ability to change a warehouse size on their mediu…
- Question 6What service is provided as an integrated Snowflake feature to enhance Multi-Factor Authe…
