Skip to content

DQL

Bringing dbt's discipline to the analytics layer — built on top of dbt.

dbt governs your models; the answers built on them — the query behind a dashboard tile, the metric pasted into Slack, the SQL an AI assistant just improvised against your warehouse — usually aren't reviewed, tested, or owned. DQL carries that same discipline downstream: every answer becomes a certified block (SQL + owner, domain, tests, chart intent, and LLM context) in a git-tracked .dql file. Apps package certified blocks into decision-facing dashboard pages and notebooks. dql compile generates a dbt-like manifest with lineage from sources and dbt models through blocks and Apps — and the agent/MCP server answers from certified blocks first, flagging anything improvised as Uncertified.

No hosted account is required. Certification is a local trust label. Personas and policies are local previews, not hosted RBAC.

Start Here

From your dbt repo (or clone jaffle-shop-duckdb and run ./setup.sh first):

dbt parse                        # ensure target/manifest.json exists
npx create-dql-app@latest dql    # scaffolds ./dql, auto-wires dbt
cd dql
npm install
npm run sync                     # import dbt models + lineage
npm run notebook                 # http://127.0.0.1:3474

Then run:

npm run compile
npm run lineage

Why DQL

  • Certified blocks. Save reusable answer units with metadata, tests, and local trust status.
  • Apps in git. Package dashboard pages, notebooks, text, AI pins, and draft blocks in local App folders.
  • dbt-aware lineage. Connect sources, dbt models, semantic metrics, DQL blocks, dashboard pages, and Apps in dql-manifest.json.
  • Agent-safe defaults. Local agent and MCP tools prefer certified blocks and label fallback generated SQL as uncertified.
  • OSS boundary clarity. Local single-user workflows are open source; hosted auth, managed secrets, audit logs, organization RBAC, and approval workflows are outside OSS.

Learn

  1. Quickstart — add DQL to a dbt repo
  2. DQL in 5 concepts
  3. Tutorials — blocks → dashboards & Apps → agent → CI
  4. Block Studio
  5. Author a certified block
  6. Import dbt

What Ships

flowchart LR
    Project["DQL project"] --> Compiler["dql compile"]
    Compiler --> Manifest["dql-manifest.json"]
    Manifest --> Lineage["dql lineage"]
    Manifest --> MCP["dql mcp"]
    Manifest --> Notebook["dql notebook + Apps"]
    Blocks["Certified blocks"] --> Apps["Apps"]
    Apps --> Notebook
Package What it does
@duckcodeailabs/dql-cli The dql binary: notebook, compile, validate, certify, lineage, MCP
@duckcodeailabs/dql-core Parser, formatter, semantic analyzer, manifest builder, lineage
@duckcodeailabs/dql-mcp MCP tools for certified block search, query, certification, and lineage
@duckcodeailabs/dql-lsp LSP for .dql files
@duckcodeailabs/dql-openlineage OpenLineage project snapshot events

GitHub · Roadmap · Support