Duration: ~1 hour
Difficulty: Intermediate
Technical Requirements: Working knowledge of data streaming and schema management
This hands-on workshop demonstrates how to prototype data contracts as a shift-left strategy to prevent data quality issues before they impact downstream systems. You will play the role of a data engineer at River Hotels, a fictitious hospitality company, to build a proof-of-concept that showcases robust data governance practices and demonstrates how they ensure data reliability and prevent costly pipeline failures.
graph TD
subgraph "Shift Left Data Pipeline"
A2[Data Source] --> B2[Process and Clean Data near the Source]
B2 --> C2[Ingest High-Quality Data]
C2 --> D2[Store in Data Warehouse/Lake]
D2 --> E2[Analyze and Consume]
end
subgraph "Traditional Data Pipeline"
A1[Data Source] --> B1[Ingest Raw Data]
B1 --> C1[Store in Data Warehouse/Lake]
C1 --> D1[Process and Clean Data]
D1 --> E1[Analyze and Consume]
end
If you have any issues or feedback for this workshop, please let us know in this quick 2-minute survey!
You must complete each of these to successfully go through this workshop:
- Confluent Cloud account with admin privileges - sign up for a free trial
- AWS CLI installed and authenticated with an AWS account that has permissions to create resources
- Databricks account and existing workspace - can be a free trial account OR a free edition account
- Terraform installed
- Docker Desktop installed
- Git installed
Warning
Payment Method or Promo Code Required for Confluent Cloud
You must either add a payment method or redeem a coupon code to be able to run this workshop.
River Hotels is facing a critical data reliability crisis. Despite having a modern data infrastructure, they're experiencing frequent pipeline failures, inconsistent analytics, and eroded trust in their data products. The root cause? No formal data contracts or governance practices to prevent bad data from propagating through their systems.
River Hotels' current approach to data management is reactive - they discover data quality issues only after downstream systems break or business reports show inconsistencies. This "firefighting" approach is unsustainable and costly, leading to delayed insights, missed business opportunities, and frustrated stakeholders.
The leadership team has called an emergency meeting where each department shares their pain points:
"We can't trust our customer behavior reports," explains the Head of Analytics. "Last week, our clickstream data suddenly changed format without warning. Our customer segmentation models broke, and we had to spend three days rebuilding our entire pipeline. By then, the marketing campaign deadlines had passed."
The Engineering Manager shares equally frustrating experiences: "Every time upstream teams make 'simple' changes to their data structures, our applications crash. We spend more time fixing data-related bugs than building new features. We need a way to catch these issues before they reach production."
The Chief Data Officer is concerned about the broader implications: "Our data products are becoming unreliable. Business teams are losing confidence in our analytics, and we're making decisions based on incomplete or incorrect data. We need to shift our approach from reactive to proactive data governance."
Your CTO has made the directive clear: "We need to implement data contracts that catch issues at the source, not at the destination. If we can shift data quality validation to the left - closer to where data is produced - we can prevent cascading failures and build trust in our data ecosystem."
Your task is to build a proof-of-concept data contracts framework that demonstrates how River Hotels can transform from a reactive data organization into a proactive, governed data ecosystem.
- π Prototype formal data contracts with schema registry
- π‘οΈ Demonstrate data quality rules that prevent bad data propagation
- π Showcase schema evolution without breaking downstream systems
- π¨ Implement dead letter queues for contract violations
- π Validate the shift-left approach with an enriched data set
By the end of this workshop, you will have prototyped a data contracts framework that:
- Establishes Schema Registry: Set up centralized schema management for all data streams
- Implements Data Quality Rules: Create automated validation that prevents bad data from entering topics
- Handles Schema Evolution: Safely evolve schemas while maintaining backward compatibility
- Manages Contract Violations: Route invalid data to dead letter queues for review and remediation
- Provides Governance Visibility: Monitor contract compliance and data quality metrics
Important: This is a proof-of-concept environment designed for learning and demonstration. For production deployment, additional considerations around feature sets, security, scalability, and operational monitoring would be required.
- Data Contracts: Understand how to establish formal agreements between data producers and consumers
- Schema Registry: Learn to implement centralized schema management for data governance
- Data Quality Rules: Demonstrate automated validation to prevent bad data propagation
- Schema Evolution: Practice handling schema changes without breaking downstream systems
- Shift-Left Strategy: Experience proactive data governance practices in a controlled environment
Focus: This workshop emphasizes hands-on learning and concept demonstration rather than production deployment patterns.
The following diagrams represent the proof-of-concept data contracts architecture you will implement and the governance framework that demonstrates data quality principles.
erDiagram
CUSTOMER {
string CUSTOMER_ID PK
string EMAIL UK
string FIRST_NAME
string LAST_NAME
string BIRTH_DATE
long CREATED_AT
}
HOTEL {
string HOTEL_ID PK
string NAME
string CLASS
string DESCRIPTION
string CITY
string COUNTRY
int ROOM_CAPACITY
long CREATED_AT
}
CLICKSTREAM {
string CLICKSTREAM_ID PK
string CUSTOMER_EMAIL FK
string HOTEL_ID FK
string ACTION
int EVENT_DURATION
string URL
long CREATED_AT
}
%% Relationships
CUSTOMER ||--o{ CLICKSTREAM : "generates"
HOTEL ||--o{ CLICKSTREAM : "viewed_in"
The data contracts architecture you'll implement follows this flow:
graph LR
A[Data Producers] --> B[Schema Registry]
B --> C[Data Quality Rules]
C --> D{Contract Valid?}
D -->|Yes| E[Kafka Topics]
D -->|No| F[Dead Letter Queue]
E --> G[Downstream Consumers]
F --> H[Data Steward Review]
H --> I[Remediation]
I --> A
This architecture demonstrates proactive data governance by validating data contracts before issues propagate downstream.
This workshop is organized into six sequential labs that build a proof-of-concept step by step.
Each lab builds upon the previous one, so start with LAB 1 and continue until you are done.
- LAB 1: Setup accounts and deploy infrastructure with Terraform
- LAB 2: Prototype data contracts with schema registry and governance
- LAB 3: Validate data contracts with realistic data generation
- LAB 4: Test schema evolution and contract enforcement
- LAB 5: Analytics with Tableflow and Databricks
- LAB 6: Workshop cleanup and summary
- RECAP: Review takeaways from this workshop
Congratulations! You've completed a comprehensive proof-of-concept for data contracts and shift-left governance.
Please help us improve this workshop by leaving your feedback in this quick 2-minute survey!
Thanks!
