Week 126 - Data Loading & Staging

Welcome to this week’s Frosty Friday challenge! In this challenge, you'll explore Snowflake’s powerful metadata and schema inference capabilities. Your task is to use INFER_SCHEMA to extract metadata from a Parquet file in a stage and transform it into a Snowflake table.

By following a series of steps, you will go from querying the metadata of a staged file to creating a Snowflake table using the inferred schema. Can you connect the dots and complete the pipeline?

Using the INFER_SCHEMA and GENERATE_COLUMN_DESCRIPTION functions, as shown in the first image, your task is to:

  1. Query Metadata: Use the INFER_SCHEMA function to extract the metadata of a staged Parquet file. This metadata will include column names, data types, and file-level details.
  2. Transform Metadata: Generate a CREATE TABLE statement using the inferred metadata (as shown in the second image) to define the table structure.

Enjoy finding it and remember to post your code 🙂

Previous
Previous

Week 127 - Cortex (AI / ML)

Next
Next

Week 125 - Snowpark & Python