Skip to content

Analytics Engineeringis ETM.

ETL ends at Load. Dex is built for what comes after: explore your data, transform it into models and semantic layers, and maintain them as sources change.

1explore2transform3maintain
dex: thelook_ecommerce
ranked inventory
order_items181K rows
inventory_items490K rows
users100K rows
products29K rows
PIIusers.email flagged PII (email) · never surfaced
SELECT product_id, COUNT(*) AS units_sold, SUM(sale_price) AS revenue FROM order_items JOIN inventory_items ON …
needs confirmation · est. 49.3 MB scanned
✓ allowed · 10 rows returned
Draft map cached to .dex/ · fully read-only
/dex:explore what's in the thelook_ecommerce warehouse?

Writing SQL is one part of analytics engineering.

Your agent also needs to:

  1. 1understand the schema without starting from scratch every session,
  2. 2find the relevant tables among thousands,
  3. 3account for what a query costs,
  4. 4keep personal data out of its context,
  5. 5keep models and metric definitions coherent as their sources change.

Dex gives the agent a repeatable explore, transform, maintain loop, with guardrails enforced in the engine.

1

Explore

/dex:explore

Make sense of your data.

Stop running SELECT * LIMIT 10 by hand. Dex intelligently profiles columns, infers relationships, and builds a comprehensive draft map of your tables, cached locally. PII is automatically flagged, never surfaced.

Find the tables that matter, profile their columns, and verify joins before writing SQL. Answer ad-hoc questions through a query firewall that checks for personal data, read and query the semantic layer, and map relationships as a Mermaid ER diagram. Exploration needs no dbt project.

Read-only · writes only the .dex/ cache

Explore commands
CommandWhat it returns
dex explore mapInventory every table: grain, joins, PII flags, data-quality findings
dex explore profileColumn profiles: types, shapes, nulls, distinct counts
dex explore relationships --verifyJoins checked against the data, not guessed from names
dex explore queryAd-hoc SQL through the query firewall and cost guard
dex explore semanticRead and query the semantic layer the repo declares
dex explore diagramThe relationships as a Mermaid ER diagram
2

Transform

/dex:transform

Build models and semantic layers.

Ask for a metric, and Dex writes the reviewable diffs. It authors dependency-aware dbt SQL models, schema tests, and the semantic layer on top, in MetricFlow, Apache Ossie, SLayer, Cube, Snowflake Semantic Views, or Databricks Metric Views. Validate against dev targets with built-in cost guards before anything runs.

Build and refactor dbt models from staging to marts, with tests, docs, and declared grain and population. Define semantic models and metrics over them, or work with a native semantic layer without a dbt project. Review each stored plan before applying it, then build and verify on a dev target.

Reviewable diffs · dev-target builds only

Transform commands
CommandWhat it returns
dex transform initBootstrap a dbt project
dex transform planA change as a reviewable diff with a plan id; nothing is written
dex transform applyWrite a reviewed plan to the repository
dex transform build --verifyBuild on dev, cost-quoted first, and check the result against its declaration
dex transform declarePropose declarations for models that have none
dex transform testRun the project's tests on dev
3

Maintain

/dex:maintain

Detect drift before it breaks.

Sources change. Business definitions drift. Run /dex:maintain against your .dex/ snapshot to instantly detect schema, grain, and semantic drift. Dex proposes the exact edits needed to keep your project correct.

Compare database schemas and profiles, the dbt project, and the semantic layer with the last snapshot. See which models and metrics a change affects and review the proposed edits. maintain verify also checks a project as it stands, with no baseline needed.

Drift as findings · fixes as diffs

Maintain commands
CommandWhat it returns
dex maintain verifyCheck the project as it stands, no baseline needed
dex maintain snapshotRecord the baseline in .dex/snapshot.json
dex maintain checkSchema, volume, grain and semantic drift against the snapshot
dex maintain reconcileThe edits that bring the project back in line, as diffs
dex maintain coverageWhich models have no tests
dex maintain incidents · diagnoseTest failures as incidents, taken to a cause

The demo is broken (on purpose!)

A first run that reports a clean bill of health doesn't teach much, so the demo ships with real defects. No database, no credentials, no cloud warehouse: every query runs against a local DuckDB file.

dex: dex_demo.duckdb

uv tool install "exmergo-dex-core[duckdb]"

dex init analytics --mode demo

dex explore map

7 tables · 29,512 rows · 5 joins inferred · 6 columns flagged as personal data · 6 data-quality findings

  • Broken grainA batch was loaded twice, so order_item_id is unique for only 92.9% of rows. Dex leaves the grain unknown rather than guessing a key.
  • Mixed idssku is 90% numeric, 10% md5-shaped. Cast it to a number and you silently drop 10% of products.
  • False joinweb_events.customer_id shares a name with the CRM's key, but 100% of its values have no match.
  • RefusedThe query firewall will not put customers.email into context. count(distinct email) runs, because a statistic is not a value.

What Dex will never do.

Enforced in the engine, on every step of the loop.

G-1

Write to your source data.

Dex's own SQL is SELECT-only. The only data writes are the dbt builds you confirm, on a dev target.

G-2

Put personal data in your agent's context.

PII is flagged by column, category and confidence, and never surfaced. Only a human clears a flag.

G-3

Spend before quoting.

A metered scan returns an estimate and runs only with your confirmation and a budget.

G-4

Change your project behind your back.

Every edit is a diff, and a human edit made since planning is never overwritten.

G-5

Build anywhere but dev.

Prod-looking targets are refused outright.

Reads your warehouse. Writes your semantic layer.

Dex on public benchmarks

The loop, measured.

80%
on dbt Labs' ADE-bench with Claude Sonnet 5.5
57.3%
resolved on Snowflake’s 103-task data-eng-bench

Go deeper into the loop.

Transform

Dex Semantics

Every model your agent builds carries a declaration of what it means. Dex checks the built data against it, and the meaning flows to tests, semantic models and the next session.

Maintain

Dex Telemetry

Every run recorded, your rules checked on every run, failures folded into incidents, and your agent sent to find the cause.

Explore, Transform, Maintain: frequently asked questions

Q01What is ETM?

Explore, Transform, Maintain: the loop of analytics engineering that comes after ETL ends at Load. Explore is understanding the data that landed, Transform is building models and semantic layers on it, and Maintain is keeping them correct as sources and definitions change. Dex ships each step as an agent skill: /dex:explore, /dex:transform and /dex:maintain.

Q02Does Dex replace my coding agent?

No. Dex runs inside the agent you already use, such as Claude Code, OpenAI Codex, Cursor or Gemini CLI. The skills point the agent at the exmergo-dex-core engine, which holds the logic and the guardrails, and every command answers with one sanitized JSON envelope.

Q03Do I need a dbt project to start?

No. Explore is read-only and needs no dbt project. dex transform init bootstraps one when you are ready, and Dex can also author a native semantic layer (Apache Ossie, SLayer, Cube, Snowflake Semantic Views or Databricks Metric Views) with no dbt project in the path.

Q04What does Dex write, and where?

Only reviewable files in your repository: dbt models, tests, docs and semantic-layer definitions, each proposed as a diff with a plan id and written only on transform apply. Dex's cache and snapshots live in .dex/. Dex's own SQL against your data is SELECT-only, and the only data writes are the dbt builds you confirm, on a dev target.

Q05How is drift detected?

dex maintain snapshot records a baseline in .dex/snapshot.json. dex maintain check compares the warehouse, the dbt project and the semantic layer with it on four axes (schema, volume, grain and semantic) and names the models and metrics each change affects. dex maintain reconcile proposes the edits as diffs, and never overwrites hand-written work. dex maintain verify checks a project as it stands, with no baseline.

Install

Let your agent build your analytics.

The full loop is free and open source under Apache 2.0.

npx skills add exmergo/dex

Codex, Gemini CLI, Cursor, and others, via AGENTS.md.