forked from siklosid/dagger
-
Notifications
You must be signed in to change notification settings - Fork 1
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
Feature/plugin dbt parser #43
Merged
Merged
Conversation
This file contains 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
I don't understand the testing part in the PR description. |
siklosid
reviewed
Nov 7, 2024
* add the plugins into jinja env directly
afbd4b6
to
b0173b8
Compare
b0173b8
to
450b544
Compare
f207b2b
to
c247d0d
Compare
c247d0d
to
98a6b55
Compare
✅ Linked to Task DATA-2081 · Move dbt parser logic away from dagger |
claudiazi
previously approved these changes
Nov 12, 2024
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.
so cooool!!!!
claudiazi
approved these changes
Nov 12, 2024
siklosid
approved these changes
Nov 13, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Ticket: DATA-2081
Enabling dagger to import and use plugins. Given a folder that contains plugins(python modules), Dagger can now import the classes in these modules and enable their usage using jinja in the task configs.
How this is done:
plugin
attribute in thedagger_config.yaml
:classes
in all modules are loaded into the Jinja environment using theirclass
name.{{ <class_name>.<function_name>() }}
and it would replace this Jinja function call with the output of the function.To test out the functionality, there are two ways:
First way
tests/utilities/test_plugins.py
Second way
@skip
. It should look like below:AIRFLOW_HOME
and create a plugin folder with a sample plugin(you can copy this from thetests/fixtures/plugins
directory as an example)target_dir
Other changes:
Apart from introducing this plugin approach, i also disabled the use of the
dbt_config_parser
, so for dbt configs that are generated using code from this branch, the inputs and outputs will be null and thedbt_manifest
is not available to the jinja environment.