Define everything as code
Every model, metric, and dashboard is a plain-text definition, tracked in Git and compiled to your warehouse's native SQL. Nothing trapped in a UI, no logic copy-pasted between dashboards.
Models & datasets
Tables, dimensions, measures, and the relationships between them.
AMLorders.aml
Model orders {
dimension status { type: 'text' }
dimension amount { type: 'number' }
measure count {
definition: @aql count(orders.id) ;;
}
}
Dataset sales {
relationships: [
relationship(
orders.user_id > users.id)
]
} Metrics
Composable metric definitions in AQL, defined once and reused everywhere.
AMLmetrics.aml
Metric total_orders {
definition: @aql count(orders.id) ;;
}
Metric gmv {
definition: @aql sum(items.amount) ;;
}
Metric aov {
definition: @aql gmv / total_orders ;;
format: "[$]#,###0"
} Dashboards and charts
Canvas layout, blocks, filters, and chart types, all in code.
AMLrevenue.aml
Dashboard revenue {
block kpi: VizBlock {
viz: KPIMetric {
dataset: sales
value: gmv
}
}
block trend: VizBlock {
viz: LineChart {
dataset: sales
}
}
} Row-level permissions
Access rules written in code and reviewed like any other change.
AMLsales.aml
Dataset sales {
permission regional_access {
field: r(orders.region)
operator:
'matches_user_attribute'
value: 'region'
}
} Themes and palettes
Reusable dashboard themes and color palettes, versioned with the rest.
AMLbrand.aml
PageTheme brand_theme {
color { data: brand }
}
ColorPalette brand {
categorical {
colors: ["#4F46E5", "#22C55E"]
}
} Context for AI
Descriptions, definitions, and lineage that give AI agents the context to answer from real business logic.
AMLai_context.aml
const ai_context = @md
## Business rules
Default dataset: ${sales}
Revenue is net of refunds.
${ if (H.current_user.team == 'Finance') {
'Fiscal year starts in April.'
} }
;; “The semantic layer is Holistics' biggest draw because I was able to build reusable models, dimensions, metrics, and then describe them as code.”
Sterling Paramore · Sr Staff Data Engineer, Mainspring Energy