Docs
4. Build the source assets

Build source assets

Execute source assets' build logic to create tables or views in the data warehouse.

Overview

With the source successfully set up, we'll build the three tables and load the data into Snowflake. This step takes the raw data from Google Sheets and transforms it into usable data.

Instructions

Building: Materialize your asset

  1. Open the bottom drawer
  2. Select the build tab
  3. Insert the build command to build and import all three tables: y42 build -s source:raw_jaffle_shop_data.*
  4. Click on Visualize DAG to see the assets this command will build
  5. Click on Build now
    1. You will see a new row added to the build window
    2. The build will be in queueing mode indicated by the blue quarter bar
  6. Click on the build row to see more details
    1. You will see the three pending jobs
    2. Navigate to Logs to view build logs
    3. Navigate back to Builds jobs
    4. Click on an individual build job to see the job’s details
    5. Navigate to Logs to see detailed logs showing how your Google Sheet is accessed, rows are read, and data is written to a file that is then uploaded to your Snowflake warehouse
  7. After a couple of minutes the build should be Ready.

Publication: Adding metadata

To make our data more insightful, we'll add metadata to the raw_orders table using the auto-documentation feature. This will help us understand the columns and their types better. We'll also take a sneak peek at the data to see how it's shaping up.

Add metadata

  1. Click on raw_orders in the left file selector
  2. Click Sync columns
  3. Four columns should be added
    • order_id
    • customer_id
    • order_date
    • status
  4. Commit the table metadata
    • Click on the Commit & Push button at the top
    • Name your Commit: adding raw_orders metadata
    • Commit your changes
    • Wait for the pre-configured checks

View the data

  1. Open the bottom drawer
  2. Navigate to Data, you will see a preview of the row count
  3. Wait for the data to load
  4. Verify that you can see data

Up next

Now that you've created source tables in the data warehouse, you can reference them as upstream dependencies using dbt models.