File size: 2,637 Bytes
d15f07c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# Thin wrapper so `dbt` / Cursor can run from the repository root without
# `--project-dir dbt_project`. Paths point at the real project under `dbt_project/`.
#
# IMPORTANT: dbt looks for profiles.yml next to THIS file (repo root). Ours lives in
# `dbt_project/profiles.yml`. Always set DBT_PROFILES_DIR or use ./scripts/dbt-root.sh:
#   export DBT_PROFILES_DIR="$(pwd)/dbt_project"
#   .venv-dbt/bin/dbt seed --select jurisdiction_website_url_overrides && ...
#
# Keep `models`, `seeds`, `snapshots`, and `vars` in sync with `dbt_project/dbt_project.yml`.

name: 'open_navigator_dbt'
version: '1.0.0'
config-version: 2

profile: 'open_navigator'

model-paths: ["dbt_project/models"]
analysis-paths: ["dbt_project/analyses"]
test-paths: ["dbt_project/tests"]
seed-paths: ["dbt_project/seeds"]
macro-paths: ["dbt_project/macros"]
snapshot-paths: ["dbt_project/snapshots"]

target-path: "dbt_project/target"
packages-install-path: "dbt_project/dbt_packages"

# pg_trgm before any model builds: trigram indexes are declared in models' `indexes` config,
# built before any hook (#938). Same line as dbt_project/dbt_project.yml.
on-run-start:
  - "create extension if not exists pg_trgm"

clean-targets:
  - "dbt_project/target"
  - "dbt_project/dbt_packages"

models:
  open_navigator_dbt:
    staging:
      +materialized: view
      +schema: staging

    intermediate:
      +materialized: table
      +schema: intermediate

    # Full warehouse builds into `gold` (private/internal set); the public API
    # reads thin views in `public` published over gold. Mirror of dbt_project/dbt_project.yml.
    marts:
      +materialized: incremental
      +schema: gold
      +on_schema_change: append_new_columns
      +unique_key: id

seeds:
  open_navigator_dbt:
    +schema: seeds

snapshots:
  open_navigator_dbt:
    +target_schema: snapshots
    +unique_key: id
    +strategy: timestamp
    +updated_at: last_updated

vars:
  confidence_authoritative: 1.0
  confidence_high: 0.90
  confidence_medium: 0.70
  confidence_ai: 0.60
  confidence_low: 0.50

  fuzzy_match_threshold: 0.85

  authoritative_sources: ['openstates_api', 'irs_bmf', 'irs_990']
  ai_sources: ['gemini_ai_extraction']

  include_nearest_postal_zip: false

  # --- Civic interestingness score (mirror of dbt_project/dbt_project.yml) ---
  civic_half_life_days: 90
  civic_peer_window_days: 365
  civic_urgency_horizon_days: 14
  civic_proximity_radius_m: 40000
  civic_enable_fee_tax_bonus: false
  civic_fee_tax_bonus: 0.15
  civic_enable_buried_no_discussion: false
  civic_flag_threshold_structuring: false
  civic_approval_limit: 50000
  civic_structuring_band: 0.1