Analytics engineering for Claude Code and any agent: data warehouse exploration, dbt transformation and semantic modeling, and schema-drift maintenance on dbt.
Project description
exmergo-dex-core
The portable, Apache-2.0 analytics-engineering engine behind
dex. All non-trivial logic lives here; the
Claude Code skills and the cross-agent AGENTS.md are thin wrappers that drive it
through one stable command contract.
dex is the agent-native analytics engineering toolkit: explore an unfamiliar warehouse, transform raw data into clean dbt models and a semantic layer on top, and maintain all of it as the data underneath changes. Read-only against your data; every change is a reviewable diff.
Install
pip install "exmergo-dex-core"
Connector client libraries live behind extras, so the zero-credential DuckDB
on-ramp installs only duckdb and sqlglot:
exmergo-dex-core[duckdb] # the on-ramp and the eval/benchmark engine
exmergo-dex-core[snowflake]
exmergo-dex-core[bigquery]
exmergo-dex-core[databricks]
exmergo-dex-core[postgres]
exmergo-dex-core[all] # every connector at once
The command contract
Every subcommand prints exactly one sanitized JSON envelope to stdout and nothing
else; nothing reaches agent context except through that envelope. Credentials
never cross it, and data values cross only from profiled, PII-cleared columns,
bounded and capped by the query firewall. State persists in .dex/, so
subcommands are stateless and the agent orchestrates multi-step flows.
dex connect test --path data.duckdb
See references/command-contract.md for
the full surface and the envelope spec.
Status
Early and under active development; expect pre-release versions. Today the engine runs Explore and Transform end to end on DuckDB and on BigQuery.
Explore: ranks what matters in an unfamiliar warehouse, profiles columns
selectively, flags PII, surfaces grain and data-quality warnings, infers joins
and verifies them with overlap probes (--verify), and executes agent-authored
ad-hoc SELECTs behind a PII-aware query firewall (explore query), all
read-only.
Transform: bootstraps a dbt project where none exists (transform init, with an
explicit connector, never a default), turns agent-authored edits and
deterministic staging scaffolds into reviewable, conflict-checked diffs
(transform plan / apply, with human edits authoritative on conflict), runs
gated dev-target-only builds with cost surfaced before any spend
(transform build), and authors the semantic layer as MetricFlow-validated dbt
semantic models (semantic define|update|plan, applied with transform apply).
BigQuery: connects through Application Default Credentials
(gcloud auth application-default login; dex discovers credentials, it never
asks for keys). Metadata is free; every scan is dry-run first, returned as a
needs_confirmation estimate, and runs only with --confirm --budget <bytes>,
capped server-side by maximum_bytes_billed and recorded in a local
.dex/spend.jsonl ledger. dbt builds go to a dedicated dev dataset via
dbt-bigquery, which the [bigquery] extra carries. See
references/bigquery.md.
Snowflake: connects through discovered credentials (connections.toml,
SNOWFLAKE_* env, or a dbt profile; dex never asks for or persists a
password). The cost inversion from BigQuery: metadata is free (SHOW commands,
no warehouse), while scans bill warehouse time, so budgets are
warehouse-seconds with credits shown alongside. Estimates are an honestly
labeled heuristic (Snowflake has no dry-run), floored by the 60-second resume
minimum on a cold warehouse; the budget is hard-enforced anyway by a
per-statement server-side STATEMENT_TIMEOUT_IN_SECONDS, and actual seconds
land in the same .dex/spend.jsonl ledger. Billed work runs only on the
warehouse the config pins. dbt builds go to a dedicated dev database.schema
via dbt-snowflake, which the [snowflake] extra carries. See
references/snowflake.md.
Maintain detects drift against the .dex/ snapshot on four axes and proposes
the fix: schema (structure), volume (freshness), grain (uniqueness and fanout),
and semantic (definitions, dangling references, and dimension cardinality).
maintain check sweeps all of them, ranked by blast radius; reconcile
proposes reviewable diffs tagged mechanical or advisory, applied through
transform apply. Detection is read-only on every connector; on billed
connectors the metadata axes (schema, volume, references) stay free while the
scanning axes (grain, dimension cardinality) take the --confirm --budget
handshake, so check is two-phase.
The remaining cloud connectors (Databricks, PostgreSQL) and the Viz preview
report not_implemented until they land.
License
Apache-2.0.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file exmergo_dex_core-0.1.4.tar.gz.
File metadata
- Download URL: exmergo_dex_core-0.1.4.tar.gz
- Upload date:
- Size: 335.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
df7842af40b0a8332a29474c72526e18c8b94dfa8aa0ab2023895f3611941e1c
|
|
| MD5 |
74270eed7d35ecaa38c0f8ac90f4e130
|
|
| BLAKE2b-256 |
d1ed9232b9673a96ae57b195c9fb67a8a7028682fbde216421bb8d5f21b7c33a
|
File details
Details for the file exmergo_dex_core-0.1.4-py3-none-any.whl.
File metadata
- Download URL: exmergo_dex_core-0.1.4-py3-none-any.whl
- Upload date:
- Size: 146.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ca1c5722235af38ecb565e92b1deba84ad8b46b4b545b7a0d81745f4df976a19
|
|
| MD5 |
810c6f200a69437affe424b0d46b3246
|
|
| BLAKE2b-256 |
73ffb2ba6ca4700db6def61101b2a0c77c7531bf873985162f448c8ec53775c8
|