Which function is used to convert rows in a relational table to a single VARIANT column?
A.
ARRAY_AGG
B.
OBJECT_AGG
C.
ARRAY_CONSTRUCT
D.
OBJECT_CONSTRUCT
The Answer Is:
D
This question includes an explanation.
Explanation:
TheOBJECT_CONSTRUCTfunction in Snowflake is used to convert rows in a relational table into a single VARIANT column that represents each row as a JSON object. This function dynamically creates a JSON object from a list of key-value pairs, where each key is a column name and each value is the corresponding column value for a row. This is particularly useful for aggregating and transforming structured data into semi-structured JSON format for further processing or analysis.
[References:, Snowflake Documentation: Semi-structured Data Functions, , ]
COF-C03 PDF/Engine
Printable Format
Value of Money
100% Pass Assurance
Verified Answers
Researched by Industry Experts
Based on Real Exams Scenarios
100% Real Questions
Get 65% Discount on All Products,
Use Coupon: "ac4s65"