Malloy

The Malloy modeling language, with an engine behind it

Malloy is an open-source data modeling language: what your data means — metrics, dimensions, joins, who sees what — written down 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 the tier that serves what data means so every tool agrees: what counts as revenue, how the tables join, which rows the West team sees. Those definitions have to be written down somewhere first, and that artifact is the model. LookML, Omni, the dbt Semantic Layer, and Cube hold theirs in YAML or a configuration language, and hand the hard cases back to SQL. Malloy holds it as a real language.

That changes what a layer built on it 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

What the engine generates from your model

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. Credible helps you collect what your data means from wherever it lives — old docs, dashboards, SQL, the heads of a few experts — and write it down in Malloy. That is the what. The engine generates the how: the dashboards and data apps on top; the semantic layer that serves them, where metrics resolve consistently, governance is enforced at one gateway, and a concept index gives agents just the slice a question needs; and the pipelines, materialized storage, and indexes underneath, in storage it brings along. Every surface — Claude, ChatGPT, Gemini, and your own agents over MCP, dashboards and workspaces, the data apps and APIs in your product — is served from one semantic data model. The more it is asked, the better the model and the faster the engine.

Credible is not a semantic layer. A layer is a tier you install between your storage and your tools, then keep in sync by hand. Credible is the engine that generates that tier from your data model and runs it: no pipeline to wire underneath, no catalog beside it, no BI tool to bolt on top. One language for what your data means, one engine that generates everything else. Inside the AI Analytics Engine →

Questions

Malloy, the semantic layer, and Credible

Is Malloy a semantic layer?
No. Malloy is the language you write a data model in — metrics, dimensions, joins, access rules, and the structure underneath — as code rather than YAML. A semantic layer is the tier that serves those definitions to your tools, and that is what an engine builds from the model: Credible compiles, materializes, governs, and serves it. The difference from YAML is that Malloy 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

Model your data's meaning in Malloy, and the AI Analytics Engine delivers answers you can trust to every agent, data app, and dashboard that asks.

Read the docs