-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ele 1942 package tests separate schema per process (#599)
* tests: separate schemas for separate processes * tests: fixes to places that use target.schema * test_data source: fix * simplify usage of schema_name_suffix * docker-compose: increase postgres max connections * tests: bugfix
- Loading branch information
Showing
7 changed files
with
26 additions
and
20 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
13 changes: 13 additions & 0 deletions
13
integration_tests/dbt_project/macros/generate_schema_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,13 @@ | ||
{% macro generate_schema_name(custom_schema_name, node) -%} | ||
{%- set schema_name = target.schema -%} | ||
{% if custom_schema_name %} | ||
{% set schema_name = "{}_{}".format(schema_name, custom_schema_name) %} | ||
{% endif %} | ||
|
||
{% set schema_name_suffix_by_var = var('schema_name_suffix', '') %} | ||
{% if schema_name_suffix_by_var %} | ||
{% set schema_name = schema_name + schema_name_suffix_by_var %} | ||
{% endif %} | ||
|
||
{% do return(schema_name) %} | ||
{%- endmacro %} |
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
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