-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Read upstream descriptions from sources (#154)
* Read upstream descriptions from source * Update README.md * Add test * Update test_helper_get_models.sql
- Loading branch information
Showing
7 changed files
with
49 additions
and
5 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
select | ||
* | ||
from {{ source('codegen_integration_tests__data_source_schema', 'codegen_integration_tests__data_source_table') }} |
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
23 changes: 23 additions & 0 deletions
23
integration_tests/tests/test_generate_model_yaml_upstream_source_descriptions.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{% set actual_model_yaml = codegen.generate_model_yaml( | ||
model_names=['model_from_source'], | ||
upstream_descriptions=True, | ||
include_data_types=False | ||
) | ||
%} | ||
|
||
{% set expected_model_yaml %} | ||
version: 2 | ||
|
||
models: | ||
- name: model_from_source | ||
description: "" | ||
columns: | ||
- name: my_integer_col | ||
description: "My Integer Column" | ||
|
||
- name: my_bool_col | ||
description: "My Boolean Column" | ||
|
||
{% endset %} | ||
|
||
{{ assert_equal (actual_model_yaml | trim, expected_model_yaml | trim) }} |
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
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