Skip to content

✨ D3B-2194 guide on adding models to an airflow dag#12

Merged
chris-s-friedman merged 36 commits intomainfrom
feature/cf/d3b-2194-example-workflow
Jan 22, 2026
Merged

✨ D3B-2194 guide on adding models to an airflow dag#12
chris-s-friedman merged 36 commits intomainfrom
feature/cf/d3b-2194-example-workflow

Conversation

@chris-s-friedman
Copy link
Collaborator

@chris-s-friedman chris-s-friedman commented Jan 9, 2026

Guide and Example on adding dbt Models to Airflow in a DAG

Provides an example set of dbt models, and a corresponding Airflow DAG as well as a guide on how to write a DAG for dbt models

Closes D3B-2152 and D3B-2194

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality
    to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

By running the dbt models within airflow

Checklist

Please check all of the items below before merging this pull request. If an
item in the list below does not need to be completed, please indicate the
reason why.

  • I ensured that all tables have proper source and ref definitions
  • I Defined {{ config(schema=[schema name], tags = [list, of, tags]) }} at
    the start of each script
  • I have performed a self-review of my own code
  • I have checked my code and corrected any misspellings
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature
    works
  • My code follows the style guidelines of this project
  • My changes generate no new warnings
  • New and existing unit tests pass locally with my changes
  • I have committed any related changes to the PR
  • Run sqlfluff fix on tables that are created or modified in this PR.

@chris-s-friedman chris-s-friedman changed the title ✨ D3B-2194 New models and dags for example study ✨ D3B-2194 example study with dags and guide on writing dags Jan 9, 2026
@chris-s-friedman chris-s-friedman changed the title ✨ D3B-2194 example study with dags and guide on writing dags ✨ D3B-2194 guide on adding models to an airflow dag Jan 13, 2026
@chris-s-friedman chris-s-friedman marked this pull request as ready for review January 16, 2026 20:26
Copy link
Contributor

@awarkow awarkow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything looks good to me! Just added a few suggestions to clarify language, but was generally easy to follow.

chris-s-friedman and others added 14 commits January 21, 2026 09:24
Co-authored-by: Amanda Warkow <warkowa@chop.edu>
Co-authored-by: Amanda Warkow <warkowa@chop.edu>
Co-authored-by: Amanda Warkow <warkowa@chop.edu>
Co-authored-by: Amanda Warkow <warkowa@chop.edu>
Co-authored-by: Amanda Warkow <warkowa@chop.edu>
Co-authored-by: Amanda Warkow <warkowa@chop.edu>
Co-authored-by: Amanda Warkow <warkowa@chop.edu>
…lude-dcc/include-dbt-sandbox into feature/cf/d3b-2194-example-workflow
@brendagutman
Copy link

Would this process handle running models with vars, like this one? dbt run --select +include_aadsc_a_alpha_concept --vars '{"source_table": "include_aadsc_src_d_syndrome_extract", "target_schema": "access"}'

Copy link
Contributor

@Christina-J-Diaz Christina-J-Diaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me - good catches by amanda and thanks for putting this together :)

@chris-s-friedman
Copy link
Collaborator Author

@brendagutman

Would this process handle running models with vars, like this one? dbt run --select +include_aadsc_a_alpha_concept --vars '{"source_table": "include_aadsc_src_d_syndrome_extract", "target_schema": "access"}'

yes! documentation on that is here but the tldr: within the ProjectConfig, you can specify those run-time vars with the arg dbt_vars. Note that the docs mention:

Variables are only supported for rendering when using RenderConfig.LoadMode.DBT_LS

Using RenderConfig.LoadMode.DBT_LS is default behavior because we are not supplying a manifest.json that cosmos would otherwise default to.

Copy link

@brendagutman brendagutman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! Thanks for the documentation.

@chris-s-friedman chris-s-friedman merged commit 717ff28 into main Jan 22, 2026
@chris-s-friedman chris-s-friedman deleted the feature/cf/d3b-2194-example-workflow branch January 22, 2026 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants