malloy
Malloy is a modern open source language for describing data relationships and transformations.
What is malloy?
Malloy is a modern open source language for describing data relationships and transformations.
Overview of malloy
What it is
Malloy is an open source language for describing data relationships and transformations. It is both a semantic modeling language and a query language that uses an existing SQL engine to execute queries. Supported SQL engines include BigQuery, Snowflake, DuckDB, MotherDuck, PostgreSQL, MySQL, Trino, Presto, and Databricks. Malloy compiles to SQL and embeds SQL, allowing users to work within their existing database and language.
Key features
- Composable analytics built from small, readable pieces.
- Native handling of nested data, including arrays of records and query pipelines, as first-class syntax.
- Every query leaves behind a semantic model, enabling reuse of definitions for subsequent questions.
- Compiles to SQL and embeds SQL, so it works with existing databases and SQL engines.
- Supports multiple SQL engines including BigQuery, Snowflake, DuckDB, MotherDuck, PostgreSQL, MySQL, Trino, Presto, and Databricks.
- Includes a VSCode Extension for building models, querying, and creating visualizations and dashboards.
- Provides a CLI for scripting, pipelines, and CI, with commands to run queries, compile to SQL, and build persistent tables.
Use cases
Malloy is used for data analysis and transformation where complex analytics need to be built from small, readable pieces. It is suitable for defining and reusing business metrics (such as on-time arrival rates) across dashboards, reports, and ad-hoc queries. It can be used in Node.js applications, from the command line for scripting and CI pipelines, and through a semantic model server (Publisher) that serves models via REST and MCP APIs for apps, BI tools, and AI agents.
Getting started
There are four ways to install Malloy:1. Install the VSCode Extension (also available in the browser via github.dev).2. Use the npm packages:bashnpm install @malloydata/malloy @malloydata/malloy-connections3. Run Malloy from the command line:bashnpm install -g malloy-climalloy-cli run my_query.malloy4. Serve models with Publisher:bashnpx @malloy-publisher/server --port 4000 --server_root path/to/your/models
License and pricing
The license is not stated in the provided metadata or README. The project is categorized as open source.
Based on the project's public README and repository metadata.