QuestionQ29

Manage and maintain database objects and virtual warehouses

A Snowflake Administrator needs to retain all virtual warehouse configurations for auditing and backup. A table already exists with this schema:

Question Image

Which commands should be run to persist the warehouse data at execution time in JSON format in the VWH_META table?

Explanation

SHOW WAREHOUSES produces warehouse metadata, and RESULT_SCAN(LAST_QUERY_ID()) exposes that preceding result set for querying. OBJECT_CONSTRUCT(*) converts each full result row into a single object, which is stored in the VARIANT column as semi-structured JSON-style data, while CURRENT_TIMESTAMP() supplies the snapshot timestamp.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!