M7XBeastandCursor 109e009210
Generate Documentation / generate-docs (push) Canceled after 0s
Run package tests for all dbs / test-postgres (push) Canceled after 0s
Run package tests for all dbs / test-other-dbs (bigquery) (push) Canceled after 0s
Run package tests for all dbs / test-other-dbs (redshift) (push) Canceled after 0s
Run package tests for all dbs / test-other-dbs (snowflake) (push) Canceled after 0s
Run package tests for all dbs / clean-up-schemas (bigquery) (push) Canceled after 0s
Run package tests for all dbs / clean-up-schemas (redshift) (push) Canceled after 0s
Run package tests for all dbs / clean-up-schemas (snowflake) (push) Canceled after 0s
Fix metric bucket anchoring and add global whole-table metrics
Metrics reported row_count 0/1 against tables that plainly had 10+ rows.

1. The metric bucket was [run_date - 1d, run_date) - it ENDED at midnight at
   the start of the run day. A model stamping `dbt_updated_at =
   CURRENT_DATETIME()` writes rows during the run, so every row fell outside
   the bucket that run had just computed. Incremental merges that re-stamp
   rows each run then pushed them into the wrong bucket or out of every
   bucket. The bucket now covers the run's calendar day:
   [midnight of run date, +1d). interval_length_sec stays 86400 and the
   daily series is unchanged.

2. There was no way to see a table as a whole. `metrics_base_insert` now also
   emits `global__<metric>` computed over the whole table (`where true`)
   alongside the windowed series, so metrics stay meaningful for models whose
   time_filter holds historical/backfilled timestamps that miss the current
   bucket. A model with no time filter already computed globally and is not
   duplicated. Disable with `f2dq:emit_global_metrics: false`.

3. overview.json metric rows dropped `time_window_start`, so no consumer could
   tell a bucket's width or spot an empty one. It is exported now.

Also: keep the guard that skips save_test_history when the f2dq_test_history
relation does not exist.

The integration_tests project pins the original re_data bucket anchoring and
`f2dq:emit_global_metrics: false` because its expected_*.csv seeds encode the
values that bucket produces and cannot be regenerated without the upstream
multi-database harness.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-14 22:15:58 +03:00

dbt_f2dq (f2dq)

Modernized fork of re_data for fast2.dev Data Quality (f2dq).

  • dbt package name: f2dq (what dbt_project.yml / detect_namespace() use)
  • Hub-style identity: dbt_f2dq
  • Version: 1.0.1
  • Requires: dbt-core >=1.0,<2.0, dbt_utils==1.4.1
packages:
  - git: "https://gitea.m7xlab.top/fast2dev/dbt-f2dq.git"
    revision: v1.0.1

Then:

dbt deps

Pin a release tag in production; use main only if you want floating tip.

Default warehouse schemas: f2dq (public models) and f2dq_internal (internal models). Override in the consuming project's dbt_project.yml under models.f2dq.

Install (local path — active development)

Prefer a local path while editing the package itself:

packages:
  - local: /path/to/dbt_f2dq

Dual-read (migration)

Node config keys accept either prefix (config top-level or config.meta / node meta — prefer meta on dbt 1.12+ to avoid CustomKeyInConfigDeprecation):

  • f2dq_monitored / re_data_monitored
  • f2dq_time_filter / re_data_time_filter
  • (same for metrics, columns, anomaly_detector, owners)
models:
  my_project:
    staging:
      +meta:
        f2dq_monitored: true
        f2dq_time_filter: created_at

Vars: f2dq:<name> preferred; boolean enable flags also honour re_data:<name> (store_table_samples, save_test_history, etc.) via f2dq.f2dq_var().

Artefacts

Exports default to target/f2dq/*.json (overview, monitored, alerts, tests_history, table_samples). Enable samples + test history:

vars:
  f2dq:store_table_samples: true
  f2dq:save_test_history: true

Repository

  • Public clone URL: https://gitea.m7xlab.top/fast2dev/dbt-f2dq.git
  • SSH (when port 22 is reachable): git@gitea.m7xlab.top:fast2dev/dbt-f2dq.git
S
Description
No description provided
Readme MIT
214 KiB
Languages
Python 87.5%
Makefile 10.9%
Shell 1.6%