Malloy describes data relationships and transformations, then runs queries through existing SQL databases. It combines semantic models with a readable query syntax that compiles to SQL.
Overview
Malloy is both a modeling language and a query language. It targets composable analytics, native handling of nested arrays and record structures, and reusable measures so definitions like on-time arrival are encoded once and shared across reports.
Supported backends include BigQuery, Snowflake, DuckDB, MotherDuck, PostgreSQL, MySQL, Trino, Presto, and Databricks. You can start in a VS Code extension locally or in the browser via github.dev, install npm packages for Node.js, or use a standalone CLI for scripts and CI.
Publisher, a related open semantic model server, can expose .malloy models over REST and MCP for BI tools and agents. The language emphasizes symmetric aggregates, nested result shapes, and pipe-based query pipelines while remaining compatible with embedded SQL.
Documentation covers quickstart, language reference, CLI usage, and advanced modeling patterns, with community support on Slack.
Key features
- Semantic models with named measures
- Compiles to existing SQL engines
- Nested data and query pipelines
- VS Code extension and browser try
- Node.js compiler packages
- CLI run, compile, and build
- Symmetric aggregate handling
- Publisher REST and MCP serving
Use cases
- Reusable analytics definitions
- Complex SQL with readable syntax
- Multi-database analytical modeling
- CI and scripted data pipelines
- Semantic layer for BI and agents