Commit 3d9b89d
authored
Assign configurable prefix to partition field names to prevent conflict with schema field names (#241)
* Updating how partitions are handled / calculated to satisfy constraints introduced in pyiceberg 0.10.0 which require partition spec field names to be different from any existing schema field names when a transform is being applied.
* Pass env into docker compose
* Correctly handle when a field isn't found in the schema
* Update partition-related fixtures to create partition columns with internal utility used to prevent partition name / column name clashes
* Add more tests to cover new functionality
* Fix tests for updates to how partition names are calculated
* Fix tests to reflect partition naming with calculated suffixes
* Absolute paths prevent cache_dir from being set in different dev environments that might not have the same directories
* Trying to speed up test initialization / teardown.
No need to recreate containers. Provide option to opt out of teardown to enable faster repeated test execution
* Switching to assigning a configurable prefix to the partition field name to make it unique.
This is more predictable and configurable than the previous implementation that added transform-specific suffixes.
* Formatting
* changelog item
* Remove unnecessary instance attribute
* Formatting
* fixing some typing errors
* Handle situations that I don't think actually happen in the wild but are needed to make the type-checking gods happy
* Update tests to account for partition_field_name_prefix
* Fix wrong partition field naming
* formatting
* Require non-empty partition_field_name_prefix
* Fix docstring
* Add migration note
* Include PR number1 parent 63fad69 commit 3d9b89d
17 files changed
Lines changed: 709 additions & 80 deletions
File tree
- libraries/dagster-iceberg
- src/dagster_iceberg
- _utils
- tests
- _utils
- io_managers
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
112 | | - | |
| 112 | + | |
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
| |||
Lines changed: 13 additions & 20 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
4 | | - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
5 | 13 | | |
6 | 14 | | |
7 | 15 | | |
| |||
11 | 19 | | |
12 | 20 | | |
13 | 21 | | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
| 22 | + | |
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
38 | 39 | | |
39 | 40 | | |
40 | 41 | | |
| |||
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
| 48 | + | |
47 | 49 | | |
48 | 50 | | |
49 | 51 | | |
| |||
113 | 115 | | |
114 | 116 | | |
115 | 117 | | |
| 118 | + | |
116 | 119 | | |
117 | 120 | | |
118 | 121 | | |
| |||
135 | 138 | | |
136 | 139 | | |
137 | 140 | | |
| 141 | + | |
138 | 142 | | |
139 | 143 | | |
140 | 144 | | |
| |||
Lines changed: 105 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 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 | + | |
31 | 75 | | |
32 | 76 | | |
33 | 77 | | |
| |||
211 | 255 | | |
212 | 256 | | |
213 | 257 | | |
| 258 | + | |
214 | 259 | | |
215 | 260 | | |
216 | 261 | | |
| |||
222 | 267 | | |
223 | 268 | | |
224 | 269 | | |
| 270 | + | |
225 | 271 | | |
226 | 272 | | |
227 | 273 | | |
228 | 274 | | |
229 | | - | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
230 | 281 | | |
231 | 282 | | |
232 | 283 | | |
| |||
235 | 286 | | |
236 | 287 | | |
237 | 288 | | |
| 289 | + | |
238 | 290 | | |
239 | 291 | | |
240 | 292 | | |
| |||
383 | 435 | | |
384 | 436 | | |
385 | 437 | | |
386 | | - | |
387 | | - | |
388 | | - | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
389 | 443 | | |
390 | 444 | | |
391 | 445 | | |
| |||
415 | 469 | | |
416 | 470 | | |
417 | 471 | | |
418 | | - | |
419 | | - | |
420 | | - | |
421 | | - | |
422 | | - | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
423 | 497 | | |
424 | 498 | | |
425 | 499 | | |
426 | 500 | | |
427 | 501 | | |
428 | 502 | | |
429 | 503 | | |
| 504 | + | |
430 | 505 | | |
431 | 506 | | |
432 | 507 | | |
| 508 | + | |
433 | 509 | | |
434 | 510 | | |
435 | 511 | | |
| |||
444 | 520 | | |
445 | 521 | | |
446 | 522 | | |
447 | | - | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
448 | 534 | | |
449 | 535 | | |
450 | 536 | | |
| |||
456 | 542 | | |
457 | 543 | | |
458 | 544 | | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
459 | 552 | | |
460 | 553 | | |
| 554 | + | |
461 | 555 | | |
462 | 556 | | |
463 | 557 | | |
464 | | - | |
465 | | - | |
466 | | - | |
467 | | - | |
468 | | - | |
| 558 | + | |
469 | 559 | | |
470 | 560 | | |
471 | 561 | | |
| |||
Lines changed: 18 additions & 0 deletions
| 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 | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | | - | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
45 | 46 | | |
46 | 47 | | |
47 | 48 | | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | | - | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
19 | 25 | | |
20 | 26 | | |
21 | 27 | | |
| |||
57 | 63 | | |
58 | 64 | | |
59 | 65 | | |
| 66 | + | |
60 | 67 | | |
61 | 68 | | |
62 | 69 | | |
| |||
71 | 78 | | |
72 | 79 | | |
73 | 80 | | |
| 81 | + | |
74 | 82 | | |
75 | 83 | | |
76 | 84 | | |
| |||
91 | 99 | | |
92 | 100 | | |
93 | 101 | | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
94 | 127 | | |
| 128 | + | |
95 | 129 | | |
96 | 130 | | |
97 | 131 | | |
| |||
0 commit comments