-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #202 from microsoft/dbtsynapse1.6_dataroots
v1.6.0rc1
- Loading branch information
Showing
21 changed files
with
857 additions
and
256 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 |
---|---|---|
@@ -1 +1 @@ | ||
version = "1.5.0rc1" | ||
version = "1.6.0rc1" |
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
29 changes: 29 additions & 0 deletions
29
dbt/include/synapse/macros/materializations/models/materialized_view/materialized_view.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,29 @@ | ||
{% macro ref(model_name) %} | ||
|
||
{% do return(builtins.ref(model_name).include(database=false)) %} | ||
|
||
{% endmacro %} | ||
|
||
{% macro synapse__get_replace_materialized_view_as_sql(relation, sql, existing_relation, backup_relation, intermediate_relation) %} | ||
{# Synapse does not have ALTER...RENAME function, so use synapse__rename_relation_script #} | ||
|
||
{%- set dist = config.get('dist', default="ROUND_ROBIN") -%} | ||
EXEC(' | ||
CREATE materialized view {{ intermediate_relation.include(database=False) }} | ||
WITH ( DISTRIBUTION = {{dist}} ) | ||
AS {{ sql }} | ||
'); | ||
|
||
{{ synapse__rename_relation_script(existing_relation, backup_relation) }} | ||
{{ synapse__rename_relation_script(intermediate_relation, relation) }} | ||
|
||
{% endmacro %} | ||
|
||
{% macro synapse__get_create_materialized_view_as_sql(relation, sql) %} | ||
{%- set dist = config.get('dist', default="ROUND_ROBIN") -%} | ||
|
||
CREATE materialized view {{ relation.include(database=False) }} | ||
WITH ( DISTRIBUTION = {{dist}} ) | ||
AS {{ sql }} | ||
|
||
{% 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
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
Oops, something went wrong.