-
Notifications
You must be signed in to change notification settings - Fork 205
Ele 4724 dbt fusion support #1961
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
a221229
add dbt fusion runner
haritamar 6786110
remove call_macro
haritamar f9cd3cc
fixes
haritamar 10178a8
bugfix
haritamar 25ba4a9
bugfix - parent dataclass can't have defaults
haritamar 54258a4
replace dbt.create_table_as with our implementation
haritamar 04cabab
don't run deps from the runner for dbt fusion
haritamar 914ef84
Merge branch 'master' into ele-4724-dbt_fusion-support
haritamar 9c1b656
Merge branch 'master' into ele-4724-dbt_fusion-support
haritamar File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| import os | ||
|
|
||
| from elementary.clients.dbt.subprocess_dbt_runner import SubprocessDbtRunner | ||
|
|
||
| DBT_FUSION_PATH = os.getenv("DBT_FUSION_PATH", "~/.local/bin/dbt") | ||
|
|
||
|
|
||
| class DbtFusionRunner(SubprocessDbtRunner): | ||
| def _get_dbt_command_name(self) -> str: | ||
| return os.path.expanduser(DBT_FUSION_PATH) | ||
|
|
||
| def _run_deps_if_needed(self): | ||
| # Currently we don't support auto-updating deps for dbt fusion | ||
| return |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 5 additions & 5 deletions
10
tests/tests_with_db/dbt_project/macros/materializations.sql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,19 +1,19 @@ | ||
| {% materialization test, default %} | ||
| {% if var('enable_elementary_test_materialization', false) %} | ||
| {% do return(elementary.materialization_test_default.call_macro()) %} | ||
| {% do return(elementary.materialization_test_default()) %} | ||
| {% else %} | ||
| {% do return(dbt.materialization_test_default.call_macro()) %} | ||
| {% do return(dbt.materialization_test_default()) %} | ||
| {% endif %} | ||
| {% endmaterialization %} | ||
|
|
||
| {% materialization test, adapter="snowflake" %} | ||
| {% if var('enable_elementary_test_materialization', false) %} | ||
| {% do return(elementary.materialization_test_snowflake.call_macro()) %} | ||
| {% do return(elementary.materialization_test_snowflake()) %} | ||
| {% else %} | ||
| {% if dbt.materialization_test_snowflake %} | ||
| {% do return(dbt.materialization_test_snowflake.call_macro()) %} | ||
| {% do return(dbt.materialization_test_snowflake()) %} | ||
| {% else %} | ||
| {% do return(dbt.materialization_test_default.call_macro()) %} | ||
| {% do return(dbt.materialization_test_default()) %} | ||
| {% endif %} | ||
| {% endif %} | ||
| {% endmaterialization %} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add an execution timeout to avoid hung subprocesses.
Long/hung dbt processes will block indefinitely; add a configurable timeout.
Optionally document EDR_DBT_SUBPROCESS_TIMEOUT_SEC in README.
📝 Committable suggestion
🧰 Tools
🪛 Ruff (0.13.1)
28-28:
subprocesscall: check for execution of untrusted input(S603)
29-29: Consider
[self._get_dbt_command_name(), *dbt_command_args]instead of concatenationReplace with
[self._get_dbt_command_name(), *dbt_command_args](RUF005)
🤖 Prompt for AI Agents