Models are currently in beta and are available on Team, Pro, and Enterprise plans.
When to use models
Models are ideal for:- Joining sources together - Combine data from multiple sources or databases into a single clean table
- Type casting - Convert data types ahead of time so your reports don’t need to handle it
- Reusable logic - Centralize calculations and business logic in one place instead of repeating it across reports
- Pre-running large queries - Execute heavy transformations once instead of on every page load
- Clean report tables - Create simple, well-structured tables that are easy to work with when building visualizations
Creating a model
- Navigate to the Models tab in the sidebar
- Click New Model
- Name your model - this is how you’ll reference it in your reports
- Write your SQL query in the editor
- Click Save to create the model
What should go in models
Models are where complex data preparation happens, keeping your reports fast and focused on presentation.Joins belong in models
All joins between sources should be handled in models, not in reports. This ensures:- Faster report loading times
- Consistent join logic across all reports
- Easier maintenance when relationships change
Model granularity
Create models at the most granular level users need for drilldown and exploration. Think about:- What’s the finest detail users should be able to filter to?
- What dimensions do they need to slice and dice by?
- What level of detail supports their analysis?
Recategorizing and bucketing
Use CASE statements in models to create clean, consistent categories. This is ideal for:- Bucketing numeric values into ranges (small/medium/large orders)
- Standardizing messy category data
- Creating business-friendly labels from technical values
Keep reports simple
Reports should focus on filtering, sorting, and presenting data from models. Complex transformations and joins slow down reports and make them harder to maintain. In models: Joins, aggregations, complex calculations, data type casting, CASE statementsIn reports: Filtering, sorting, simple calculations, formatting
Refresh schedules
Models automatically refresh every 8 hours to keep your data up to date. You can also manually refresh a model at any time from the Models page. Custom refresh schedules are coming soon.Examples
Enriched order details
Create a model calledenriched_orders
that joins order details with item information:
enriched_orders
throughout your reports:
Daily sales summary
Create a model calleddaily_sales
that pre-aggregates order data by day:
daily_sales
in a line chart to visualize trends over time:
Order summary with item counts
Create a model calledorder_summary
that combines headers with aggregated details:
order_summary
to quickly analyze order patterns: