Which function can be combined with the copy command to unload a relational table into a JSON file?
Which function can be combined with the copy command to unload a relational table into a JSON file?
To unload a relational table into a JSON file, OBJECT_CONSTRUCT can be used. This function constructs an OBJECT (in JSON format) from its arguments, which makes it suitable for converting relational data into a semi-structured JSON format before unloading it with a copy command.
c is correct answer
https://docs.snowflake.com/en/user-guide/data-unload-considerations#unloading-a-relational-table-to-json
C is correct as it's relation to semi conversion
Correct answer
Flattens (explodes) compound values into multiple rows. FLATTEN is a table function that takes a VARIANT, OBJECT, or ARRAY column and produces a lateral view (i.e. an inline view that contains correlation referring to other tables that precede it in the FROM clause). FLATTEN can be used to convert semi-structured data to a relational representation.
This is opposit where we are unloading from relation to semi, hence C is the correct which will convert relation to semi