-
Notifications
You must be signed in to change notification settings - Fork 129
Feature/generate multiple models yaml #85
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
12 commits
Select commit
Hold shift + click to select a range
5cb6a2d
generate_model_yaml for multiple models
angelica-lastra b2d9197
updated README for generate_model_yaml
angelica-lastra 370f6cd
Updated README to include dbt runs w/ string/list
angelica-lastra c24912a
Added generate_model_yaml_multiple_models test
angelica-lastra 1ebff62
Update README.md
angelica-lastra af741ce
updated - allow list as inputs and error on string
angelica-lastra 3669971
updated - integration tests as lists for gmy
angelica-lastra 456015b
updated upstream descriptions
angelica-lastra f9ea194
cleaned code for readability
angelica-lastra 62c2c1a
updated README with consistent examples
angelica-lastra 3e9650f
fixed error message wording
angelica-lastra 09d7b52
fixed message error issue
angelica-lastra 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
30 changes: 30 additions & 0 deletions
30
integration_tests/tests/test_generate_model_yaml_multiple_models.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 |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| {% set actual_model_yaml = codegen.generate_model_yaml( | ||
| model_names=['data__a_relation','data__b_relation'] | ||
| ) | ||
| %} | ||
|
|
||
| {% set expected_model_yaml %} | ||
| version: 2 | ||
|
|
||
| models: | ||
| - name: data__a_relation | ||
| description: "" | ||
| columns: | ||
| - name: col_a | ||
| description: "" | ||
|
|
||
| - name: col_b | ||
| description: "" | ||
|
|
||
| - name: data__b_relation | ||
| description: "" | ||
| columns: | ||
| - name: col_a | ||
| description: "" | ||
|
|
||
| - name: col_b | ||
| description: "" | ||
|
|
||
| {% endset %} | ||
|
|
||
| {{ assert_equal (actual_model_yaml | trim, expected_model_yaml | trim) }} |
2 changes: 1 addition & 1 deletion
2
integration_tests/tests/test_generate_model_yaml_upstream_descriptions.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
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
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.