Skip to main content

prumi-adapter-dbt

Prumi adapter for dbt semantic models. MetricFlow compiles a semantic query into SQL for the warehouse; Prumi executes that SQL over its own connection; the warehouse enforces access rules.

Install it with Prumi: uv tool install "prumi[dbt]" installs both, with DuckDB; the dbt-style pip install prumi "prumi-adapter-dbt[duckdb]" gives the same packages. Import name: prumi_adapter_dbt.

Preparing your dbt project

What Prumi reads

Prumi reads one file: target/semantic_manifest.json, which dbt parse (or any dbt command that parses the project) writes. It doesn't run dbt and doesn't need your dbt project folder.

For Prumi to show anything, the project needs:

  • semantic_models: with entities, dimensions and measures, and metrics: built on them (dbt docs);
  • a time spine model, which MetricFlow requires for time grains.

Prumi shows your metrics as they are: names, labels, descriptions, types and valid dimensions all come from the manifest. It never copies or changes your definitions.

dbt's semantic layer describes how a metric is computed, but not how it should be displayed: it has no field saying that revenue is money in USD, or that gross_margin_pct is a fraction to show as a percentage. Without that, every dashboard guesses, and the same metric ends up as 0.25 on one page and 25% on another, or with currencies mixed on one chart.

Prumi takes formats from the metric definition so they're the same everywhere. We suggest adding them under config.meta.prumi on each metric:

metrics:
  - name: revenue
    label: Revenue
    description: Net sales after discounts, in USD.
    type: simple
    type_params:
      measure: revenue_amount
    config:
      meta:
        prumi:
          format: currency   # number | integer | percent | currency
          unit: USD          # ISO 4217 code for currency; free text otherwise ("orders")
          decimals: 2        # optional
        owner: sales-analytics
Key Values Meaning
format number, integer, percent, currency percent means the value is a fraction: 0.25 shows as 25%
unit ISO 4217 code for currency (USD, EUR, BRL); any text otherwise Required for currency. Prumi warns when one block mixes units
decimals 0–20 Optional. Defaults: up to 2 for number, 0 for integer, 1 for percent, and the currency's usual digits for currency (2 for USD, 0 for JPY)
  • It's optional. A metric without meta.prumi still works: it's shown as a plain number, and the validator warns that no format is declared (R10.no_format). An invalid entry is treated the same way.
  • Why under a prumi key: meta is dbt's free-form dictionary for other tools, and dbt itself ignores it. Several tools read keys like meta.format with their own meanings, so Prumi keeps its settings in its own namespace to avoid clashes.
  • Owner: Prumi shows config.meta.owner (a common convention, outside the prumi key) as the metric's owner when it's a string.

The demo project in examples/demo-dbt-project uses this convention on every metric except discount_rate, which is left without a format on purpose.

Dimension names

Prumi uses MetricFlow's names for dimensions (customer__region: the region of the customer entity). When MetricFlow can reach the same attribute through several join paths, Prumi shows only the shortest one for each metric, so agents don't see near-duplicates.

Metadata

Release files for prumi-adapter-dbt 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for prumi-adapter-dbt 0.1.0
File Size Uploaded Provenance
prumi_adapter_dbt-0.1.0.tar.gz 26.4 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for prumi-adapter-dbt 0.1.0
File Interpreter ABI Platform
prumi_adapter_dbt-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 46.6 kB

Release files / prumi_adapter_dbt-0.1.0.tar.gz

Download URL prumi_adapter_dbt-0.1.0.tar.gz
Size 26.4 kB
Tags Source
SHA-256 checksum
How to use checksums
c0659f02240be78e4439c5d41cafc03f716082b23221308ec21cf0c2af591661
BLAKE2b-256 checksum
How to use checksums
9e9f695d880dd2e9c91e031c76d1178725769264834a94784295483098bb118a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.3 {"installer":{"name":"uv","version":"0.13.3","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}

Release files / prumi_adapter_dbt-0.1.0-py3-none-any.whl

Download URL prumi_adapter_dbt-0.1.0-py3-none-any.whl
Size 20.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
78f996d61d9ccb454f5d4c42ba88875c200841fedaec0ca860ae98a18bb9e5be
BLAKE2b-256 checksum
How to use checksums
3e5a07236e99bfd8d5ce96ca83d7d3a70da7dbc3358ec854aa8ca03334b6bb99
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.3 {"installer":{"name":"uv","version":"0.13.3","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}

Security for prumi-adapter-dbt 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page