-
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.
* Addig another parameter to pass a list of tables to generate_source * Addig another parameter to pass a list of tables to generate_source * Updated README * Updated changelog * Apply suggestions from code review * Update integration_tests/tests/test_generate_source_some_tables.sql Co-authored-by: Doug Beatty <44704949+dbeatty10@users.noreply.github.com>
- Loading branch information
Showing
4 changed files
with
38 additions
and
2 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
30 changes: 30 additions & 0 deletions
30
integration_tests/tests/test_generate_source_some_tables.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,30 @@ | ||
{% set raw_schema = generate_schema_name('raw_data') %} | ||
|
||
-- test all args | ||
{% set actual_source_yaml = codegen.generate_source( | ||
schema_name=raw_schema, | ||
database_name=target.database, | ||
table_names=['data__a_relation'], | ||
generate_columns=True, | ||
include_descriptions=True | ||
) %} | ||
|
||
|
||
{% set expected_source_yaml %} | ||
version: 2 | ||
|
||
sources: | ||
- name: {{ raw_schema | trim }} | ||
description: "" | ||
tables: | ||
- name: data__a_relation | ||
description: "" | ||
columns: | ||
- name: col_a | ||
description: "" | ||
- name: col_b | ||
description: "" | ||
|
||
{% 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