-
Notifications
You must be signed in to change notification settings - Fork 112
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature/generate_source_descs_iss64 (#66)
* update generate_source.sql to add descriptions for table/source and name arg * add integration tests * fix test * update all args source test * changelog * Update macros/generate_source.sql Co-authored-by: Doug Beatty <44704949+dbeatty10@users.noreply.github.com> * Update README.md Co-authored-by: Doug Beatty <44704949+dbeatty10@users.noreply.github.com> * moved name to end up arguments block in readme * Update integration_tests/tests/test_generate_source_all_args.sql Co-authored-by: Doug Beatty <44704949+dbeatty10@users.noreply.github.com> * move name to last arg in test_generate_source_all_args Co-authored-by: Doug Beatty <44704949+dbeatty10@users.noreply.github.com>
- Loading branch information
Showing
6 changed files
with
62 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
21 changes: 21 additions & 0 deletions
21
integration_tests/tests/test_generate_source_table_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,21 @@ | ||
|
||
{% set raw_schema = generate_schema_name('raw_data') %} | ||
|
||
-- test default args | ||
{% set actual_source_yaml = codegen.generate_source(raw_schema, include_descriptions=True) %} | ||
|
||
{% set expected_source_yaml %} | ||
version: 2 | ||
|
||
sources: | ||
- name: {{ raw_schema | trim }} | ||
description: "" | ||
tables: | ||
- name: data__a_relation | ||
description: "" | ||
- name: data__b_relation | ||
description: "" | ||
{% endset %} | ||
|
||
|
||
{{ assert_equal (actual_source_yaml | trim, expected_source_yaml | trim) }} |
20 changes: 20 additions & 0 deletions
20
integration_tests/tests/test_generate_source_table_name.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,20 @@ | ||
|
||
{% set raw_schema = generate_schema_name('raw_data') %} | ||
|
||
-- test default args | ||
{% set actual_source_yaml = codegen.generate_source(raw_schema, name='raw') %} | ||
|
||
{% set expected_source_yaml %} | ||
version: 2 | ||
|
||
sources: | ||
- name: raw | ||
schema: {{ raw_schema | trim }} | ||
tables: | ||
- name: data__a_relation | ||
- name: data__b_relation | ||
|
||
{% endset %} | ||
|
||
|
||
{{ assert_equal (actual_source_yaml | trim, expected_source_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