Get startedGet started for free

Defining the schema

Let's start by defining the expected schema for data validation. This is a critical step in ensuring data quality throughout the ETL pipeline.

You'll use the pointblank library to define the schema structure.

The dataset has already been loaded for you as ts.

This exercise is part of the course

Designing Forecasting Pipelines for Production

View Course

Exercise instructions

  • Start by importing pointblank.
  • Define the schema using the right method.
  • Set the respondent column to object type and value column to float64 type.

Hands-on interactive exercise

Have a go at this exercise by completing this sample code.

# Import the required library
import ____ as ____

# Define the schema
table_schema =  ____.____(
    columns=[
        ("period", "datetime64[ns]"),   
        ("respondent", "____"),
        ("respondent-name", "object"),
        ("type", "object"),
        ("type-name", "object"),
        ("value", "____"),
        ("value-units", "object")])

# Print the schema
print(table_schema)
Edit and Run Code