Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
13df1026cd |
+5
-6
@@ -1,9 +1,8 @@
|
||||
# dbt build artefacts
|
||||
target/
|
||||
dbt_modules/
|
||||
dbt_packages/
|
||||
logs/
|
||||
# Keep package model sources under models/logs/ (not the dbt logs/ dir)
|
||||
# dbt build artefacts (root-only — do NOT ignore models/logs/)
|
||||
/target/
|
||||
/dbt_modules/
|
||||
/dbt_packages/
|
||||
/logs/
|
||||
|
||||
# Local / secrets
|
||||
.user.yml
|
||||
|
||||
@@ -4,7 +4,7 @@ Modernized fork of [re_data](https://github.com/re-data/re-data) for fast2.dev D
|
||||
|
||||
- **dbt package name:** `f2dq` (what `dbt_project.yml` / `detect_namespace()` use)
|
||||
- **Hub-style identity:** `dbt_f2dq`
|
||||
- **Version:** `1.0.0`
|
||||
- **Version:** `1.0.1`
|
||||
- **Requires:** dbt-core `>=1.0,<2.0`, `dbt_utils==1.4.1`
|
||||
|
||||
## Install (git — recommended)
|
||||
@@ -12,7 +12,7 @@ Modernized fork of [re_data](https://github.com/re-data/re-data) for fast2.dev D
|
||||
```yaml
|
||||
packages:
|
||||
- git: "https://gitea.m7xlab.top/fast2dev/dbt-f2dq.git"
|
||||
revision: v1.0.0
|
||||
revision: v1.0.1
|
||||
```
|
||||
|
||||
Then:
|
||||
@@ -23,6 +23,10 @@ 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:
|
||||
@@ -34,12 +38,22 @@ packages:
|
||||
|
||||
## Dual-read (migration)
|
||||
|
||||
Node config keys accept either prefix:
|
||||
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`
|
||||
- `f2dq_monitored` / `re_data_monitored`
|
||||
- `f2dq_time_filter` / `re_data_time_filter`
|
||||
- (same for metrics, columns, anomaly_detector, owners)
|
||||
|
||||
```yaml
|
||||
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()`.
|
||||
|
||||
|
||||
+3
-3
@@ -1,5 +1,5 @@
|
||||
name: "f2dq"
|
||||
version: "1.0.0" # dbt_f2dq: modernized fork (dbt_utils 1.4.1); dual-read re_data_* keys
|
||||
version: "1.0.1" # dbt_f2dq: modernized fork (dbt_utils 1.4.1); dual-read re_data_* keys
|
||||
config-version: 2
|
||||
|
||||
require-dbt-version: [">=1.0.0", "<2.0.0"]
|
||||
@@ -68,6 +68,6 @@ vars:
|
||||
|
||||
models:
|
||||
f2dq:
|
||||
+schema: f2
|
||||
+schema: f2dq
|
||||
internal:
|
||||
+schema: f2_internal
|
||||
+schema: f2dq_internal
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
{{
|
||||
config(
|
||||
materialized='incremental',
|
||||
on_schema_change='sync_all_columns',
|
||||
)
|
||||
}}
|
||||
|
||||
{{
|
||||
f2dq.empty_table_generic([
|
||||
('table_name', 'string'),
|
||||
('column_name', 'string'),
|
||||
('test_name', 'string'),
|
||||
('status', 'string'),
|
||||
('execution_time', 'numeric'),
|
||||
('message', 'string'),
|
||||
('failures_count', 'numeric'),
|
||||
('failures_json', 'long_string'),
|
||||
('failures_table', 'long_string'),
|
||||
('severity', 'string'),
|
||||
('compiled_sql', 'long_string'),
|
||||
('run_at', 'timestamp')
|
||||
])
|
||||
}}
|
||||
Reference in New Issue
Block a user