-
Notifications
You must be signed in to change notification settings - Fork 4
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 #27 from ScalefreeCOM/dev_tkirschke
Fixed Column selection for Hubs and Links - Hash Algorithm Selection Fixed
- Loading branch information
Showing
11 changed files
with
274 additions
and
238 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
defaultStorageMapping: null | ||
defaultStorageMapping: CORE | ||
fileVersion: 3 |
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,3 +1,7 @@ | ||
defaultStorageMapping: null | ||
defaultStorageMapping: CORE | ||
fileVersion: 1 | ||
locations: [] | ||
locations: | ||
- CORE | ||
- EXTERNAL_TABLES | ||
- RAW_STAGE | ||
- TPCH_SF1 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,52 @@ | ||
{% if node.materializationType == 'table' %} | ||
{{ stage('Create Dimension Table') }} | ||
|
||
CREATE OR REPLACE TABLE {{ ref_no_link(node.location.name, node.name) }} | ||
( | ||
{% for col in columns %} | ||
"{{ col.name }}" {{ col.dataType }} | ||
{% if col.isSurrogateKey %} | ||
identity | ||
{% endif %} | ||
{%- if not col.nullable %} NOT NULL | ||
{%- if col.defaultValue | length > 0 %} DEFAULT {{ col.defaultValue }}{% endif %} | ||
{% endif %} | ||
{%- if col.description | length > 0 %} COMMENT '{{ col.description | escape }}'{% endif %} | ||
{%- if not loop.last -%}, {% endif %} | ||
{% endfor %} | ||
) | ||
{%- if node.description | length > 0 %} COMMENT = '{{ node.description | escape }}'{% endif %} | ||
{{ stage('Create Dimension Table') }} | ||
|
||
CREATE OR REPLACE TABLE {{ ref_no_link(node.location.name, node.name) }} | ||
( | ||
{% for col in columns %} | ||
"{{ col.name }}" {{ col.dataType }} | ||
{% if col.isSurrogateKey %} | ||
identity | ||
{% endif %} | ||
{%- if not col.nullable %} NOT NULL | ||
{%- if col.defaultValue | length > 0 %} DEFAULT {{ col.defaultValue }}{% endif %} | ||
{% endif %} | ||
{%- if col.description | length > 0 %} COMMENT '{{ col.description | escape }}'{% endif %} | ||
{%- if not loop.last -%}, {% endif %} | ||
{% endfor %} | ||
) | ||
{%- if node.description | length > 0 %} COMMENT = '{{ node.description | escape }}'{% endif %} | ||
|
||
|
||
{% elif node.materializationType == 'view' %} | ||
{{ stage('Create Dimension View') }} | ||
|
||
CREATE OR REPLACE VIEW {{ ref_no_link(node.location.name, node.name) }} | ||
( | ||
{% for col in columns %} | ||
"{{ col.name }}" | ||
{%- if col.description | length > 0 %} COMMENT '{{ col.description | escape }}'{% endif %} | ||
{%- if not loop.last -%},{% endif %} | ||
{% endfor %} | ||
) | ||
{%- if node.description | length > 0 %} COMMENT = '{{ node.description | escape }}'{% endif %} | ||
AS | ||
{% for source in sources %} | ||
|
||
{% if loop.first %}SELECT {% endif %} | ||
|
||
{% for col in source.columns %} | ||
{% if col.isSurrogateKey or col.isSystemUpdateDate or col.isSystemCreateDate %} | ||
{{ stage('Create Dimension View') }} | ||
|
||
CREATE OR REPLACE VIEW {{ ref_no_link(node.location.name, node.name) }} | ||
( | ||
{% for col in columns %} | ||
"{{ col.name }}" | ||
{%- if col.description | length > 0 %} COMMENT '{{ col.description | escape }}'{% endif %} | ||
{%- if not loop.last -%},{% endif %} | ||
{% endfor %} | ||
) | ||
{%- if node.description | length > 0 %} COMMENT = '{{ node.description | escape }}'{% endif %} | ||
AS | ||
{% for source in sources %} | ||
|
||
{% if loop.first %}SELECT {% endif %} | ||
|
||
{% for col in source.columns %} | ||
{% if col.isSurrogateKey or col.isSystemUpdateDate or col.isSystemCreateDate %} | ||
NULL | ||
{% else %} | ||
{% else %} | ||
{{ get_source_transform(col) }} | ||
{% endif %} | ||
AS "{{ col.name }}" | ||
{%- if not loop.last -%}, {% endif %} | ||
{% endfor %} | ||
{{ source.join }} | ||
|
||
{% if not loop.last %} UNION ALL {% endif %} | ||
{% endfor %} | ||
{% endif %} | ||
AS "{{ col.name }}" | ||
{%- if not loop.last -%}, {% endif %} | ||
{% endfor %} | ||
{{ source.join }} | ||
|
||
{% if not loop.last %} UNION ALL {% endif %} | ||
{% endfor %} | ||
|
||
{% endif %} |
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.