SnowPro Core Certification — Question 1131
How can a relational table be unloaded into a JSON file?
Answer options
- A. Use the OBJECT_CONSTRUCT function in conjunction with the COPY INTO [location] command.
- B. Use the COPY INTO [location] command with the file_format set as JSON.
- C. Use the PUT command with the file_format set as JSON.
- D. Use the GET command with the file_format set as JSON.
Correct answer: A
Explanation
The correct answer is A because using the OBJECT_CONSTRUCT function with the COPY INTO command allows for proper formatting of the data into JSON structure. Option B is incorrect as it suggests just setting the file_format, which does not utilize the necessary function to structure the data correctly. Options C and D are also incorrect because they refer to commands that are not meant for unloading data from a relational table.