Malloy

The Malloy semantic layer, with an engine behind it

Malloy is the open-source language the industry calls a semantic layer: what your data means — metrics, dimensions, joins, who sees what — written down once, as code, correct by construction, and readable by people and AI alike. Credible is the AI Analytics Engine that runs it.

Read the docs

The language

What Malloy is

Malloy is a language for describing data relationships and transformations, created by Lloyd Tabb, the co-founder of Looker and the author of LookML. It is thirty years of data modeling distilled into one open language: sources, dimensions, measures, and views, declared once and composed freely, compiled to optimized SQL for whatever database holds the data — BigQuery, Snowflake, Postgres, Databricks, DuckDB, and more.

It is MIT-licensed, a Linux Foundation project, and in the training data of every major model, so an AI agent writes it as fluently as Python. The language reference lives at malloydata.dev and the source on GitHub.

The category

Why people call it a semantic layer

A semantic layer is where a company writes down what its data means so every tool agrees: what counts as revenue, how the tables join, which rows the West team sees. LookML, Omni, the dbt Semantic Layer, and Cube all hold that in YAML or a configuration language, and hand the hard cases back to SQL. Malloy holds it as a real language.

That changes what the layer can promise. Joins are declared once, and symmetric aggregates mean joined totals never double-count — the fan-out bugs that silently corrupt SQL can't be written. Nesting and level-of-detail are primitives, not workarounds. A definition is a name other definitions build on, so the model composes instead of duplicating. And because it is plain text in git, it diffs, reviews, tests, and ships like the software it is.

If you run a semantic layer today, it is the input, not a rewrite: see how a LookML, Omni, dbt Semantic Layer, or Cube model lands in Malloy, and why Malloy in the docs.

The engine

Where the layer ends and the engine begins

A language needs a runtime. Malloy Publisher is the open-source server that serves Malloy models over REST and MCP — the open protocol that connects agents to tools — and Credible maintains it in the open, along with the modeling and analysis skills that let an agent write and query a model.

Credible is the AI Analytics Engine built around it. You write down what your data means, once, in Malloy. The engine owns the how: it decides what to precompute, index, and materialize, in storage it brings along; enforces who sees what at one gateway on every query; compresses the model into a concept index so agents get just the slice a question needs; and serves every surface — Claude, ChatGPT, Gemini, and your own agents over MCP, dashboards and workspaces, the data apps and APIs in your product — from one model. The more it is asked, the better the model and the faster the engine.

We don't call Credible a semantic layer. The layer is the one thing we took out: no pipeline underneath, no catalog beside it, no BI tool on top. One language for what your data means, one engine that owns everything else. Inside the AI Analytics Engine →

Questions

Malloy, the semantic layer, and Credible

Is Malloy a semantic layer?
Malloy is a language for what a semantic layer holds — metrics, dimensions, joins, access rules — written as code rather than YAML. A Malloy model is the semantic layer; the difference is that it is a real language, so it composes, type-checks, and compiles to SQL, and both people and AI can read it.
Is Malloy open source, and who maintains it?
Yes. Malloy is MIT-licensed and a Linux Foundation project, created by Lloyd Tabb, the co-founder of Looker and creator of LookML. Malloy Publisher, the open-source server that serves Malloy models over REST and MCP, is maintained by Credible in the open.
How does Malloy compare to LookML, Omni, the dbt Semantic Layer, or Cube?
Those tools define semantics in YAML or a configuration language and hand the hard cases back to SQL. Malloy is a full language: joins declared once, symmetric aggregates so joined totals never double-count, nesting and level-of-detail built in, and a compiler that generates SQL for any warehouse. Existing LookML, Omni, dbt, and Cube models migrate into it as prior art rather than a rewrite.
Do I need Credible to use Malloy?
No. Malloy runs anywhere, and Malloy Publisher serves models for free. Credible is the hosted, governed engine on top: it materializes and indexes the model, enforces access on every query through one gateway, serves every surface — agents over MCP, dashboards, data apps, APIs — and tunes itself from what gets asked.
How do AI agents use a Malloy model?
At publish, the engine compresses the model into a concept index — every source, measure, and dimension, its documentation, and the indexed values. When an agent asks a question over MCP, the engine returns just the slice of the model that answers it, with suggested queries grounded in governed views, so the agent works from your definitions instead of guessing at raw tables.

The AI Analytics Engine

Make your data Credible

Write down what your data means once, in Malloy, and the AI Analytics Engine delivers answers you can trust to every agent, data app, and dashboard that asks.

Read the docs