Commit 65f6727
committed
fix(dagster-dbt): improve error messages for missing dbt adapter and invalid target_path
- Wrap `dbt.adapters` import in `compat.py` with an actionable
ModuleNotFoundError that suggests installing the correct adapter package
- Add the same ModuleNotFoundError guard in `_initialize_dbt_core_adapter`
for the `dbt.adapters.factory` import
- Split the bare `except:` in `cli()` adapter init into a specific
ModuleNotFoundError branch with an installation hint, and an Exception
fallback for other errors
- Add an explicit isinstance check for `target_path` in `cli()` to surface
a clear ValueError instead of an AttributeError when a str is passed1 parent 2804c08 commit 65f6727
2 files changed
Lines changed: 45 additions & 8 deletions
Lines changed: 13 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
48 | 56 | | |
49 | 57 | | |
50 | 58 | | |
| |||
Lines changed: 32 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
361 | 361 | | |
362 | 362 | | |
363 | 363 | | |
364 | | - | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
365 | 373 | | |
366 | 374 | | |
367 | 375 | | |
| |||
646 | 654 | | |
647 | 655 | | |
648 | 656 | | |
649 | | - | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
650 | 664 | | |
651 | 665 | | |
652 | 666 | | |
| |||
717 | 731 | | |
718 | 732 | | |
719 | 733 | | |
720 | | - | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
721 | 750 | | |
722 | 751 | | |
723 | 752 | | |
| |||
0 commit comments