-
Notifications
You must be signed in to change notification settings - Fork 672
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
[Plugin]: Add example of per model dbt execution #3135
Comments
I've set up a blog post on this topic, here's the relevant section to this discussion. This is something I've been interested in doing for a long time, and we set up a demo of this (which is the write up) over the summer using containerTasks. I think this can easily be converted to dbtrun tasks as well though. Perhaps the dbt DAG export could be explicitly written as a dbt plugin task. But I've also submitted a feature request to make 'execution plan exports' a standard feature in dbt here. Otherwise creating the DAG in Flyte can be easily accomplished with ImperativeWorkflows Here's a summary of the steps to get the DAG
This execution plan can then be built in Flyte, with ImperativeWorkflows. In my article I've done that with ContainterTasks, but I think it's simple to convert over to DBTRun tasks if someone wanted! from flytekitplugins.dbt.task import DBTRun
from flytekitplugins.dbt.schema import DBTRunInput
from flytekit.core.workflow import ImperativeWorkflow
DBT_PROJECT_DIR = "/Users/timothyl/git/tim-flyte-test/dbt_demo_project"
DBT_PROFILES_DIR = "/Users/timothyl/git/tim-flyte-test/dbt_demo_project"
DBT_PROFILE = "bq-oauth"
input_ = DBTRunInput(
project_dir=DBT_PROJECT_DIR,
profiles_dir=DBT_PROFILES_DIR,
profile=DBT_PROFILE,
select=["tag:something"])
task_1 = DBTRun(name="test-task")
task_2 = DBTRun(name="test-task2")
wb3 = ImperativeWorkflow(name='imperative_dbt_demo')
task1_task_id = wb3.add_entity(task_1, input = input_)
task2_task_id = wb3.add_entity(task_2, input = input_)
task2_task_id.runs_before(task1_task_id) |
Hello 👋, this issue has been inactive for over 9 months. To help maintain a clean and focused backlog, we'll be marking this issue as stale and will engage on it to decide if it is still applicable. |
@davidmirror-ops can you assign this issue to me? |
@someshfengde yes! Please let us know soon if you have questions. |
yes sure thanks for assigning :) |
Provide a documented example of how to do substantial orchestration of a dbt task. I was interested to see if I could replicate the logic in this proposed Airlfow DAG orchestration that orchestrates a dbt project. In the workflow they do the following:
Is this kind of logic possible using something like
@dynamic
workflows to dynamically generate the tasks during execution or through a script that generates it prior to registration?The text was updated successfully, but these errors were encountered: