-
Notifications
You must be signed in to change notification settings - Fork 294
Add integration test for creating a TaskGroup by dbt project folder
#2420
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
78 commits
Select commit
Hold shift + click to select a range
de2ea0c
feat: iterate over node file path to create TaskGroups based on model…
maximilianoarcieri 103cb3b
Merge branch 'astronomer:main' into feat/create-task-groups-by-dbt-mo…
maximilianoarcieri 14c0b8e
feat: add original_file_path as a class variable of DbtNode
maximilianoarcieri c090c89
feat: replace class variable to iterate over original_file_path
maximilianoarcieri 1f84c5c
🎨 [pre-commit.ci] Auto format from pre-commit.com hooks
pre-commit-ci[bot] c679a1d
feat: separate new logic in a function
maximilianoarcieri 5e9e356
feat: sync changes with remote repository
maximilianoarcieri 6c4d923
🎨 [pre-commit.ci] Auto format from pre-commit.com hooks
pre-commit-ci[bot] ecd8e15
feat: add class variable origin_file_path in tests
maximilianoarcieri c6d2ed3
merge: branch 'feat/create-task-groups-by-dbt-models' of github.com:m…
maximilianoarcieri 950d95e
🎨 [pre-commit.ci] Auto format from pre-commit.com hooks
pre-commit-ci[bot] ff1894e
fix: rename class variable original_vile_path
maximilianoarcieri cadadee
feat: add task_group_id on task_id of tasks
maximilianoarcieri 2989277
feat: sync with remote branch
maximilianoarcieri cd78121
🎨 [pre-commit.ci] Auto format from pre-commit.com hooks
pre-commit-ci[bot] 50ae158
feat: add type annotation for task_groups variable
maximilianoarcieri ff881b6
feat: add original_file_path variable DbtNode creation
maximilianoarcieri d0131aa
fix: allow None as a valid task_group in generate_parent_task_group
maximilianoarcieri 76e9133
fix: add missing package methodtools to pass tests
4029b7c
fix: add missing package methodtools to pass tests
maximilianoarcieri 5ee537e
fix: change data type of expected variable original_file_path
d18bdaa
sync: branch 'main' of github.com:maximilianoarcieri/astronomer-cosmos
maximilianoarcieri 727106a
merge: branch 'main' into feat/create-task-groups-by-dbt-models
maximilianoarcieri b2b95f5
feat: set enable_resource_grouping to True in RenderConfig
d772671
feat: add enable_resource_grouping variable o make the feature option…
c7c15c5
feat: add documentation about class variable enable_resource_grouping…
74cfa6a
🎨 [pre-commit.ci] Auto format from pre-commit.com hooks
pre-commit-ci[bot] 7cbc218
fix: change structure to decomplex; format code in tests
621d262
merge: branch 'feat/create-task-groups-by-dbt-models' of github.com:m…
84952d6
Merge branch 'main' into feat/create-task-groups-by-dbt-models
tatiana 65fb5b8
merge: branch 'main' of github.com:maximilianoarcieri/astronomer-cosmos
maximilianoarcieri 6a0c706
feat: add class variable original_file_path in test_selector.py
45b343b
Merge branch 'astronomer:main' into feat/create-task-groups-by-dbt-mo…
maximilianoarcieri 1f6a8a4
Merge branch 'main' into feat/create-task-groups-by-dbt-models
maximilianoarcieri b3c6b0e
Merge branch 'main' into feat/create-task-groups-by-dbt-models
maximilianoarcieri d73f728
Merge branch 'main' into feat/create-task-groups-by-dbt-models
maximilianoarcieri 9d95f39
Merge branch 'main' of github.com:maximilianoarcieri/astronomer-cosmos
maximilianoarcieri d40a31d
fix: merge with main and resolve conflicts
maximilianoarcieri c078082
Merge branch 'main' into feat/create-task-groups-by-dbt-models
maximilianoarcieri bde5062
fix: reorganize parameters
maximilianoarcieri 0539a16
fix: add missing argument in test
maximilianoarcieri 0d4ba13
Merge branch 'feat/create-task-groups-by-dbt-models' of github.com:ma…
maximilianoarcieri 0eed825
Merge branch 'main' of github.com:maximilianoarcieri/astronomer-cosmos
maximilianoarcieri 0b9c39d
Merge branch 'main' into feat/create-task-groups-by-dbt-models
maximilianoarcieri 5221dbe
Merge branch 'main' into feat/create-task-groups-by-dbt-models
maximilianoarcieri 8232147
Merge branch 'main' into feat/create-task-groups-by-dbt-models
tatiana b2eb75a
Merge branch 'main' into feat/create-task-groups-by-dbt-models
tatiana 9894be9
🎨 [pre-commit.ci] Auto format from pre-commit.com hooks
pre-commit-ci[bot] b925a20
Fix pre-commit issues post-conflict resolving with main
tatiana aa2989c
Avoid redundant original_file_path definition and get unit tests to pass
tatiana 589df48
Rename enable_resource_grouping to group_nodes_by_folder
tatiana 12c73f8
Fix breaking test test_graph.py::test_build_airflow_graph_after_all
tatiana 4792651
Add multi_folder dbt project and example DAG to illustrate how it loo…
tatiana f12852d
Improve test coverage
tatiana 17c6d03
Rename generate_resource_task_group to create_task_groups_based_on_fo…
tatiana a69d66e
Add a multi folder DAG using ExecutionMode.WATCHER
tatiana 7c1a30d
Bump actions/download-artifact from 7 to 8 (#2425)
dependabot[bot] 82a51a4
⬆ [pre-commit.ci] pre-commit autoupdate (#2422)
pre-commit-ci[bot] 0a1add3
Introduce the concept of an `interceptor` in Cosmos tasks (#2419)
tatiana dcceb76
Revert virtualenv pin for hatch installation in CI (#2426)
pankajkoti 4d25b3d
Change multi_folder_grouped_watcher_dag so it uses TestBehavior after…
tatiana f69b443
Remove multi folder example DAG and create individual tests
tatiana f35eccf
Fix integration tests
tatiana 326f266
Merge branch 'main' into feat/create-task-groups-by-dbt-models
tatiana d7ded97
Remove update from old render-config
tatiana 38d366c
Merge branch 'main' into feat/create-task-groups-by-dbt-models
tatiana 201bec9
Update docs
tatiana ba646e3
Merge branch 'main' into feat/create-task-groups-by-dbt-models
tatiana 0ecac5e
Fix merge commit issues
tatiana e7e644e
Remove @tatiana's contributions
tatiana 7ccbf4c
Apply suggestion from @tatiana
tatiana 7fea8aa
Apply suggestion from @tatiana
tatiana 1c22749
Fix broken test when merging GH suggestion
tatiana 407138d
Add integration tests to validate the TaskGroup per folder feature
tatiana 2e6c709
Revert "Remove @tatiana's contributions"
tatiana 4bd719c
Merge branch 'main' into feat/create-task-groups-by-dbt-models
tatiana db25dde
Add depedencies checks on tests
tatiana 8ac42cb
Fix failing unit tests
tatiana 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| target/ | ||
| dbt_packages/ | ||
| logs/ | ||
| dbt_internal_packages/ |
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,23 @@ | ||
| name: 'multi_folder' | ||
| version: '0.1.0' | ||
| config-version: 2 | ||
|
|
||
| profile: 'default' | ||
|
|
||
| seed-paths: ["seeds"] | ||
| model-paths: ["models"] | ||
|
|
||
| test-paths: ["tests"] | ||
| target-path: "target" | ||
| clean-targets: | ||
| - "target" | ||
| - "logs" | ||
|
|
||
| require-dbt-version: [">=1.0.0", "<2.0.0"] | ||
|
|
||
| models: | ||
| multi_folder: | ||
| models_a: | ||
| +materialized: view | ||
| models_b: | ||
| +materialized: view |
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,6 @@ | ||
| -- Depends on model: models_a/stg_products.sql | ||
| select | ||
| product_id, | ||
| product_name, | ||
| upper(product_name) as product_name_upper | ||
| from {{ ref('stg_products') }} |
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,5 @@ | ||
| -- Depends on seed: seeds_a/products.csv | ||
| select | ||
| id as product_id, | ||
| name as product_name | ||
| from {{ ref('products') }} |
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,7 @@ | ||
| -- Depends on seeds: seeds_b/regions.csv and seeds_b/region_managers.csv | ||
| select | ||
| r.id as region_id, | ||
| r.name as region_name, | ||
| m.manager_name | ||
| from {{ ref('regions') }} r | ||
| left join {{ ref('region_managers') }} m on r.id = m.region_id |
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,12 @@ | ||
| default: | ||
| target: dev | ||
| outputs: | ||
| dev: | ||
| type: postgres | ||
| host: "{{ env_var('POSTGRES_HOST') }}" | ||
| user: "{{ env_var('POSTGRES_USER') }}" | ||
| password: "{{ env_var('POSTGRES_PASSWORD') }}" | ||
| port: "{{ env_var('POSTGRES_PORT') | int }}" | ||
| dbname: "{{ env_var('POSTGRES_DB') }}" | ||
| schema: "{{ env_var('POSTGRES_SCHEMA') }}" | ||
| threads: 4 |
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,4 @@ | ||
| id,name | ||
| 1,Widget | ||
| 2,Gadget | ||
| 3,Gizmo |
11 changes: 11 additions & 0 deletions
11
dev/dags/dbt/multi_folder/seeds/seeds_b/region_managers.csv
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,11 @@ | ||
| region_id,manager_name | ||
| 1,Alice | ||
| 2,Bob | ||
| 3,Carol | ||
| 4,Dave | ||
| 5,Eve | ||
| 6,Frank | ||
| 7,Grace | ||
| 8,Henry | ||
| 9,Ivy | ||
| 10,Jack |
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,11 @@ | ||
| id,name | ||
| 1,North | ||
| 2,South | ||
| 3,East | ||
| 4,West | ||
| 5,Central | ||
| 6,Northeast | ||
| 7,Northwest | ||
| 8,Southeast | ||
| 9,Southwest | ||
| 10,Midwest |
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.