Commit e0637b0
add option to partition large models (#939)
* add option to partition large models
* add explicit partition check
* undo dbt project change
* refactor: simplify BQ partitioning - enable by default, single disable flag
- Partitioning is now always on for BigQuery (partition by created_at/day)
instead of requiring an opt-in flag
- Replace partition_run_results + run_results_partition_by vars with a
single bigquery_disable_partitioning escape hatch
- Hardcode partition spec in model configs instead of indirecting through
config vars
- Restore original code formatting (revert gratuitous style changes)
- Tighten test assertions to verify partition column is created_at
Note: existing BigQuery users will need --full-refresh to apply
partitioning to already-created tables.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* refactor: extract get_default_partition_by dispatched macro
Move the BQ partition logic into a dispatched macro to avoid repeating
the target.type check across model files. Follows the same pattern as
get_default_incremental_strategy and get_default_table_type.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Itamar Hartstein <haritamar@gmail.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>1 parent 8040a76 commit e0637b0
File tree
5 files changed
+68
-0
lines changed- integration_tests/tests/test_dbt_artifacts
- macros
- edr/system/system_utils
- utils/cross_db_utils
- models/edr/dbt_artifacts
5 files changed
+68
-0
lines changedLines changed: 47 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
163 | 163 | | |
164 | 164 | | |
165 | 165 | | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
| 146 | + | |
146 | 147 | | |
147 | 148 | | |
148 | 149 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| |||
0 commit comments