Skip to content

dbt\_jev

dbt package whose macros run Jev Choice, Noul and Score over SQL values in DuckDB and ClickHouse models.

ProjectbetaMIT

Overview

dbt_jev brings Jev into dbt. Its macros evaluate SQL values through TypeSafe's hosted API or OpenRouter and work on DuckDB and ClickHouse. classify exposes a Choice as a nullable label, match_probability exposes a Noul as a nullable probability that two records match, and score applies an ordered rubric and returns the expected level, so a three-level rubric can yield fractional values such as 1.75. A decisions macro batches several typed questions about one input into a single request, with accessors to read each answer back.

It is aimed at analytics engineers who want typed judgments inside their transformation layer: labelling agent tool failures, scoring support-ticket urgency, or entity resolution where ordinary SQL generates candidate pairs and Jev scores them. Outputs are nullable, so failed calls do not break a model. The README includes a recorded OpenRouter-backed demo replayed deterministically.

What the decision model decides

TypeQuestionAnswers
ChoiceIs this tool failure expected, unexpected or unknown?expected · unexpected · unknown
Yes / noDo these records represent the same customer?true · false
ScoreRate the urgency of this support requestNo urgency · Needs attention · Urgent

How it works

  1. Generate candidate rows or pairs with ordinary SQL
  2. Call a dbt_jev macro in a model
  3. Jev returns a label, probability or expected score per row
  4. Filter or join downstream on the typed columns

Strengths

  • Typed judgments directly in dbt models
  • Batched questions per row
  • Same macros on DuckDB and ClickHouse
  • Nullable outputs tolerate failures

Caveats

  • Each row is an API call with cost and latency
  • Only DuckDB and ClickHouse supported

Getting started

Add dbt_jev to your dbt packages, configure a TypeSafe or OpenRouter key, then call {{ dbt_jev.classify(...) }} in a model.

At a glance

Type
Project
Status
beta
Language
SQL (Jinja)
Runtime
dbt on DuckDB / ClickHouse
Has code
yes
License
MIT

Use cases and integrations

How curated lists describe it

Frequently asked questions

Which warehouses are supported?

DuckDB and ClickHouse.

Can I use OpenRouter instead of TypeSafe?

Yes, both providers are supported.

What does score return?

The expected level index, which can be fractional.

Related projects

  • DuckDB extension that asks Jev about every row in SQL and returns answers as ENUM, DOUBLE or STRUCT columns.

    PluginbetaC++
  • CLI that scans tabular, structured and text files or databases and asks Jev which fields look anomalous, building a review queue.

    CLIbetaPython
  • dbt package and Terraform module adding jev_noul, jev_choice, jev_score and jev_ask SQL functions to Snowflake.

    LibrarybetaSQL
  • PostgreSQL extension with jev(), jev_prob, jev_choice and jev_score to filter, rank and classify rows by plain-language conditions.

    PluginbetaC
  • DuckDB extension that labels rows in CSV, Parquet or DuckDB tables with Jev, reported at about ten seconds per thousand rows.

    Discussionprototype
  • SQLite and Node library adding Jev judgments to SQL for matching, evidence picking, ranking, review queues and semantic CI checks.

    ProjectbetaJavaScript