Data Contract
rolling-30-day-orders
Data Contract Specification v1.2.0
Info
Information about the data contract
- Title
- Rolling 30 Day Orders
- Version
- 1.0.0
- Status
- active
- Description
- Orders aggregated over a rolling 30-day window.
- Owner
- Analytics Team
- Contact
- Yury
Servers
Servers of the data contract
-
- Server
- local-postgres
- Environment
- dev
- Type
- postgres
- Host
- localhost
- Port
- 5432
- Database
- dbt
- Schema
- dbt_ddi
- Format
- table
- Description
- Local Postgres DB
Entity Relationship Diagram
Visual representation of data model relationships
erDiagram
"**rolling_30_day_orders**" {
order_date date
total_amount decimal
order_count decimal
rolling_30_day_amount decimal
rolling_30_day_orders decimal
rolling_30_day_avg_daily decimal
}
Data Model
The logical data model
|
rolling_30_day_orders
table
Aggregated completed orders over 30 days
|
||
|---|---|---|
|
order_date
|
date |
The date of the orders (truncated to date level)
required
|
|
total_amount
|
decimal |
Total payment amount for all completed orders on this date
required
Quality | SQL: Total amount must be between 0 and 1,000,000
Query:
|
|
order_count
|
decimal |
Number of completed orders on this date
required
Quality | SQL: Order count must be between 0 and 10,000
Query:
|
|
rolling_30_day_amount
|
decimal |
Sum of total_amount over the current date and previous 29 days
required
Quality | SQL: 30-day total amount must be between 0 and 30,000,000
Query:
|
|
rolling_30_day_orders
|
decimal |
Sum of order_count over the current date and previous 29 days
required
Quality | SQL: 30-day order count must be between 0 and 300,000
Query:
|
|
rolling_30_day_avg_daily
|
decimal |
Average daily total_amount over the current date and previous 29 days
required
Quality | SQL: Average daily amount must be between 0 and 1,000,000
Query:
|
Created at 20 Sep 2025 22:40:26 UTC with Data Contract CLI v0.10.35