Preparing Practice Exam…
Please wait a moment while the system generates the exam questions, answers, and study session.
Please wait a moment while the system generates the exam questions, answers, and study session.
SnowPro Advanced: Data Engineer · Snowflake
Select one answer.
Written by other learners. Comments can disagree with the marked answer — check the official documentation when in doubt.
https://docs.snowflake.com/en/sql-reference/functions/object_construct.
OBJECT_CONSTRUCT supports expressions and queries to add, modify, or omit values from the JSON object. TO_JSON and PARSE_JSON are (almost) converse or reciprocal functions. The PARSE_JSON function takes a string as input and returns a JSON-compatible VARIANT. The TO_JSON function takes a JSON-compatible VARIANT and returns a string.
C is correct. sample from Snowflake: SELECT OBJECT_CONSTRUCT(*) AS oc FROM demo_table_1 ORDER BY oc['PROVINCE']; +---------------------------------+ | OC | |---------------------------------| | { | | "CREATED_DATE": "2020-01-19", | | "PROVINCE": "Alberta" | | } | | { | | "CREATED_DATE": "2020-01-18", | | "PROVINCE": "Manitoba" | | } | +---------------------------------+