From bd7d8ee1f60b52917baab0db112bbc97b39a7c17 Mon Sep 17 00:00:00 2001 From: Alex Higgs Date: Sat, 30 May 2020 11:57:02 +0100 Subject: [PATCH 1/7] Update README.md --- README.md | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index d5585d45c..d32bd1743 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,16 @@

-[![Documentation Status](https://readthedocs.org/projects/dbtvault/badge/?version=stable)](https://dbtvault.readthedocs.io/en/latest/?badge=stable) -[![Join our Slack](https://img.shields.io/badge/Slack-Join-yellow?style=flat&logo=slack)](https://join.slack.com/t/dbtvault/shared_invite/enQtODY5MTY3OTIyMzg2LWJlZDMyNzM4YzAzYjgzYTY0MTMzNTNjN2EyZDRjOTljYjY0NDYyYzEwMTlhODMzNGY3MmU2ODNhYWUxYmM2NjA) - +

+ Documentation Status + Join our slack +

[Changelog and past doc versions](https://dbtvault.readthedocs.io/en/latest/changelog/stable) From 648b2df8aa5180ca746ebb90016726b185cbb4f8 Mon Sep 17 00:00:00 2001 From: Alex Higgs Date: Wed, 24 Jun 2020 10:56:31 +0100 Subject: [PATCH 2/7] Added multi-dispatch and updated to dbt 0.17.0 --- dbt_project.yml | 8 +++- macros/internal/alias.sql | 24 ++++++----- macros/internal/alias_all.sql | 10 ++++- macros/internal/as_constant.sql | 8 +++- macros/internal/check_relation.sql | 22 ---------- macros/internal/multikey.sql | 32 +++++++-------- macros/staging/derive_columns.sql | 7 +++- macros/staging/hash_columns.sql | 24 +++++++---- macros/supporting/cast.sql | 64 ------------------------------ macros/supporting/hash.sql | 21 +++++++--- macros/supporting/prefix.sql | 11 ++++- macros/tables/hub.sql | 10 ++++- macros/tables/link.sql | 24 ++++++----- macros/tables/sat.sql | 10 ++++- macros/tables/t_link.sql | 10 ++++- 15 files changed, 136 insertions(+), 149 deletions(-) delete mode 100644 macros/internal/check_relation.sql delete mode 100644 macros/supporting/cast.sql diff --git a/dbt_project.yml b/dbt_project.yml index 03ad7784e..a71afdd03 100644 --- a/dbt_project.yml +++ b/dbt_project.yml @@ -1,14 +1,18 @@ name: 'dbtvault' version: '0.6' -require-dbt-version: [">=0.14.0", "<0.17.0"] +require-dbt-version: [">=0.14.0", "<0.18.0"] + +# WARNING: THIS MUST REMAIN VERSION 1 UNTIL FURTHER NOTICE +config-version: 1 profile: 'dbtvault' -source-paths: ["models"] +source-paths: ["models", "models_test"] analysis-paths: ["analysis"] test-paths: ["tests"] data-paths: ["data"] macro-paths: ["macros"] +docs-paths: ["docs"] target-path: "target" clean-targets: diff --git a/macros/internal/alias.sql b/macros/internal/alias.sql index 0e43c73e2..85fa4e84b 100644 --- a/macros/internal/alias.sql +++ b/macros/internal/alias.sql @@ -10,18 +10,24 @@ See the License for the specific language governing permissions and limitations under the License. -#} -{%- macro alias(source_column=none, prefix=none) -%} +{%- macro alias(alias_config=none, prefix=none) -%} -{%- if source_column -%} + {{- adapter_macro('dbtvault.alias', alias_config=alias_config, prefix=prefix) -}} - {%- if source_column is iterable and source_column is not string -%} +{%- endmacro %} - {%- if source_column['source_column'] and source_column['alias'] -%} +{%- macro default__alias(alias_config=none, prefix=none) -%} + +{%- if alias_config -%} + + {%- if alias_config is iterable and alias_config is not string -%} + + {%- if alias_config['source_column'] and alias_config['alias'] -%} {%- if prefix -%} - {{prefix}}.{{ source_column['source_column'] }} AS {{ source_column['alias'] }} + {{prefix}}.{{ alias_config['source_column'] }} AS {{ alias_config['alias'] }} {%- else -%} - {{ source_column['source_column'] }} AS {{ source_column['alias'] }} + {{ alias_config['source_column'] }} AS {{ alias_config['alias'] }} {%- endif -%} {%- endif -%} @@ -30,11 +36,11 @@ {%- if prefix -%} - {{- dbtvault.prefix([source_column], prefix) -}} + {{- dbtvault.prefix([alias_config], prefix) -}} {%- else -%} - {{ source_column }} + {{ alias_config }} {%- endif -%} @@ -44,7 +50,7 @@ {%- if execute -%} - {{ exceptions.raise_compiler_error("Invalid alias configuration:\nexpected format: {source_column: 'column', alias: 'column_alias'}\ngot: " ~ source_column) }} + {{ exceptions.raise_compiler_error("Invalid alias configuration:\nexpected format: {source_column: 'column', alias: 'column_alias'}\ngot: " ~ alias_config) }} {%- endif -%} diff --git a/macros/internal/alias_all.sql b/macros/internal/alias_all.sql index 6bfd74557..91a60098f 100644 --- a/macros/internal/alias_all.sql +++ b/macros/internal/alias_all.sql @@ -10,12 +10,18 @@ See the License for the specific language governing permissions and limitations under the License. -#} -{%- macro alias_all(columns, prefix) -%} +{%- macro alias_all(columns=none, prefix=none) -%} + + {{- adapter_macro('dbtvault.alias_all', columns=columns, prefix=prefix) -}} + +{%- endmacro %} + +{%- macro default__alias_all(columns, prefix) -%} {%- if columns is iterable and columns is not string -%} {%- for column in columns -%} - {{ dbtvault.alias(column, prefix) }} + {{ dbtvault.alias(alias_config=column, prefix=prefix) }} {%- if not loop.last -%} , {% endif -%} {%- endfor -%} diff --git a/macros/internal/as_constant.sql b/macros/internal/as_constant.sql index 7a4304d9f..0db5bde50 100644 --- a/macros/internal/as_constant.sql +++ b/macros/internal/as_constant.sql @@ -10,7 +10,13 @@ See the License for the specific language governing permissions and limitations under the License. -#} -{%- macro as_constant(column_str) -%} +{%- macro as_constant(column_str=none) -%} + + {{- adapter_macro('dbtvault.as_constant', column_str=column_str) -}} + +{%- endmacro %} + +{%- macro default__as_constant(column_str) -%} {% if column_str is not none %} diff --git a/macros/internal/check_relation.sql b/macros/internal/check_relation.sql deleted file mode 100644 index 2f2a8b16f..000000000 --- a/macros/internal/check_relation.sql +++ /dev/null @@ -1,22 +0,0 @@ -{#- Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. --#} - -{%- macro check_relation(obj) -%} - -{%- if not (obj is mapping and obj.get('metadata', {}).get('type', '').endswith('Relation')) -%} - {{ return(false) }} -{%- else -%} - {{ return(true) }} -{%- endif -%} - -{%- endmacro -%} \ No newline at end of file diff --git a/macros/internal/multikey.sql b/macros/internal/multikey.sql index ded071b45..645585692 100644 --- a/macros/internal/multikey.sql +++ b/macros/internal/multikey.sql @@ -10,29 +10,28 @@ See the License for the specific language governing permissions and limitations under the License. -#} +{%- macro multikey(columns=none, aliases=none, type_for=none) -%} -{%- macro multikey(columns, aliases, type_for) -%} + {{- adapter_macro('dbtvault.multikey', columns=columns, aliases=aliases, type_for=type_for) -}} + +{%- endmacro %} + +{%- macro default__multikey(columns, aliases, type_for) -%} {% if type_for == 'join' %} {% for col in columns if not columns is string %} - {% if loop.index == columns|length %} - {{ dbtvault.prefix([col], aliases[0]) }} = {{ dbtvault.prefix([col], aliases[1]) }} - {% else %} - {{ dbtvault.prefix([col], aliases[0]) }} = {{ dbtvault.prefix([col], aliases[1]) }} AND - {% endif %} + {{ dbtvault.prefix([col], aliases[0]) }} = {{ dbtvault.prefix([col], aliases[1]) }} + {% if not loop.last %} AND {% endif %} {% else %} {{ dbtvault.prefix([columns], aliases[0]) }} = {{ dbtvault.prefix([columns], aliases[1]) }} {% endfor %} -{% elif type_for == 'where null'%} +{% elif type_for == 'where null' %} {% for col in columns if not columns is string %} - {% if loop.index == columns|length %} - {{ dbtvault.prefix([col], aliases[0]) }} IS NULL - {% else %} - {{ dbtvault.prefix([col], aliases[0]) }} IS NULL AND - {% endif %} + {{ dbtvault.prefix([col], aliases[0]) }} IS NULL + {% if not loop.last %} AND {% endif %} {% else %} {{ dbtvault.prefix([columns], aliases[0]) }} IS NULL {% endfor %} @@ -40,12 +39,9 @@ {% elif type_for == 'where not null'%} {% for col in columns if not columns is string %} - {% if loop.index == columns|length %} - {{ dbtvault.prefix([col], aliases[0]) }} IS NOT NULL - {% else %} - {{ dbtvault.prefix([col], aliases[0]) }} IS NOT NULL AND - {% endif %} -{% else %} + {{ dbtvault.prefix([col], aliases[0]) }} IS NOT NULL + {% if not loop.last %} AND {% endif %} +{% else %} {{ dbtvault.prefix([columns], aliases[0]) }} IS NOT NULL {% endfor %} {% endif %} diff --git a/macros/staging/derive_columns.sql b/macros/staging/derive_columns.sql index 9edc2f315..914fe7179 100644 --- a/macros/staging/derive_columns.sql +++ b/macros/staging/derive_columns.sql @@ -10,9 +10,14 @@ See the License for the specific language governing permissions and limitations under the License. -#} - {%- macro derive_columns(source_relation=none, columns=none) -%} + {{- adapter_macro('dbtvault.derive_columns', source_relation=source_relation, columns=columns) -}} + +{%- endmacro %} + +{%- macro default__derive_columns(source_relation=none, columns=none) -%} + {%- set exclude_columns = [] -%} {%- set include_columns = [] -%} diff --git a/macros/staging/hash_columns.sql b/macros/staging/hash_columns.sql index 46fd5a45f..fc0692406 100644 --- a/macros/staging/hash_columns.sql +++ b/macros/staging/hash_columns.sql @@ -10,28 +10,38 @@ See the License for the specific language governing permissions and limitations under the License. -#} - {%- macro hash_columns(columns=none) -%} + {{- adapter_macro('dbtvault.hash_columns', columns=columns) -}} + +{%- endmacro %} + +{%- macro default__hash_columns(columns=none) -%} + {%- if columns is mapping -%} {%- for col in columns -%} - {% if columns[col] is mapping and columns[col].hashdiff -%} + {% if columns[col] is mapping and columns[col].is_hashdiff -%} - {{- dbtvault.hash(columns[col]['columns'], col, columns[col]['hashdiff']) -}} + {{- dbtvault.hash(columns=columns[col]['columns'], + alias=col, + is_hashdiff=columns[col]['is_hashdiff']) -}} {%- elif columns[col] is not mapping -%} - {{- dbtvault.hash(columns[col], col, hashdiff=false) -}} + {{- dbtvault.hash(columns=columns[col], + alias=col, + is_hashdiff=false) -}} - {%- elif columns[col] is mapping and not columns[col].hashdiff -%} + {%- elif columns[col] is mapping and not columns[col].is_hashdiff -%} {%- if execute -%} - {%- do exceptions.warn("[" ~ this ~ "] Warning: You provided a list of columns under a 'columns' key, but did not provide the 'hashdiff' flag. Use list syntax for PKs.") -%} + {%- do exceptions.warn("[" ~ this ~ "] Warning: You provided a list of columns under a 'columns' key, but did not provide the 'is_hashdiff' flag. Use list syntax for PKs.") -%} {% endif %} - {{- dbtvault.hash(columns[col]['columns'], col) -}} + {{- dbtvault.hash(columns=columns[col]['columns'], + alias=col) -}} {%- endif -%} diff --git a/macros/supporting/cast.sql b/macros/supporting/cast.sql deleted file mode 100644 index 4fbbba041..000000000 --- a/macros/supporting/cast.sql +++ /dev/null @@ -1,64 +0,0 @@ -{#- Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. --#} - -{%- macro cast(columns, prefix=none) -%} - -{#- If a string or list -#} -{%- if columns is iterable -%} - - {#- If only single string provided -#} - {%- if columns is string -%} - - {{- columns -}} - - {%- else -%} - - {%- for column in columns -%} - - {#- Output String if just a string -#} - {%- if column is string -%} - {%- if prefix -%} - {{- dbtvault.prefix([column], prefix) -}} - {%- else -%} - {{- column -}} - {%- endif -%} - - {#- Recurse if a list of lists (i.e. multi-column key) -#} - {%- elif column|first is iterable and column|first is not string -%} - {{- dbtvault.cast(column, prefix) -}} - - {#- Otherwise it is a standard list -#} - {%- else -%} - - {#- Make sure it is a triple -#} - {%- if column|length == 3 -%} - {%- if prefix -%} - CAST({{ dbtvault.prefix([column[0]], prefix) }} AS {{ column[1] }}) AS {{ column[2] }} - {%- else -%} - CAST({{ column[0] }} AS {{ column[1] }}) AS {{ column[2] }} - {%- endif -%} - {%- endif -%} - - {%- endif -%} - - {#- Add trailing comma if not last -#} - {{ ',\n' if not loop.last }} - - {%- endfor -%} - - {%- endif -%} - -{%- endif -%} - -{%- endmacro -%} - diff --git a/macros/supporting/hash.sql b/macros/supporting/hash.sql index 290070046..97851e90f 100644 --- a/macros/supporting/hash.sql +++ b/macros/supporting/hash.sql @@ -10,8 +10,17 @@ See the License for the specific language governing permissions and limitations under the License. #} +{%- macro hash(columns=none, alias=none, is_hashdiff=false) -%} -{%- macro hash(columns=none, alias=none, hashdiff=false) -%} + {% if is_hashdiff is none %} + {%- set is_hashdiff = false -%} + {% endif %} + + {{- adapter_macro('dbtvault.hash', columns=columns, alias=alias, is_hashdiff=is_hashdiff) -}} + +{%- endmacro %} + +{%- macro default__hash(columns, alias, is_hashdiff) -%} {%- set hash = var('hash', 'MD5') -%} @@ -27,15 +36,17 @@ {%- set hash_size = 16 -%} {%- endif -%} +{%- set standardise = "NULLIF(UPPER(TRIM(CAST([EXPRESSION] AS VARCHAR))), '')" %} + {#- Alpha sort columns before hashing if a hashdiff -#} -{%- if hashdiff and columns is iterable and columns is not string -%} +{%- if is_hashdiff and columns is iterable and columns is not string -%} {%- set columns = columns|sort -%} {%- endif -%} {#- If single column to hash -#} {%- if columns is string -%} {%- set column_str = dbtvault.as_constant(columns) -%} - CAST(({{ hash_alg }}(NULLIF(UPPER(TRIM(CAST({{ column_str }} AS VARCHAR))), ''))) AS BINARY({{ hash_size }})) AS {{ alias }} + CAST(({{ hash_alg }}({{ standardise | replace('[EXPRESSION]', column_str) }})) AS BINARY({{ hash_size }})) AS {{ alias }} {#- Else a list of columns to hash -#} {%- else -%} @@ -47,9 +58,9 @@ CAST({{ hash_alg }}(CONCAT( {%- set column_str = dbtvault.as_constant(column) -%} {%- if not loop.last %} - IFNULL(NULLIF(UPPER(TRIM(CAST({{ column_str }} AS VARCHAR))), ''), '^^'), '||', + IFNULL({{ standardise | replace('[EXPRESSION]', column_str) }}, '^^'), '||', {%- else %} - IFNULL(NULLIF(UPPER(TRIM(CAST({{ column_str }} AS VARCHAR))), ''), '^^') )) + IFNULL({{ standardise | replace('[EXPRESSION]', column_str) }}, '^^') )) AS BINARY({{ hash_size }})) AS {{ alias }} {%- endif -%} diff --git a/macros/supporting/prefix.sql b/macros/supporting/prefix.sql index fe081258e..5b024950b 100644 --- a/macros/supporting/prefix.sql +++ b/macros/supporting/prefix.sql @@ -11,7 +11,13 @@ limitations under the License. -#} -{%- macro prefix(columns=none, prefix_str=none, alias_target='source') -%} +{%- macro prefix(columns, prefix_str, alias_target) -%} + + {{- adapter_macro('dbtvault.prefix', columns=columns, prefix_str=prefix_str, alias_target=alias_target) -}} + +{%- endmacro -%} + +{%- macro default__prefix(columns=none, prefix_str=none, alias_target='source') -%} {%- if columns and prefix_str -%} @@ -42,8 +48,9 @@ {{- dbtvault.prefix(col, prefix_str) -}} {%- elif col is not none -%} + {{- prefix_str}}.{{col.strip() -}} - {% else %} + {% else %} {%- if execute -%} {{- exceptions.raise_compiler_error("Unexpected or missing configuration for '" ~ this ~ "' Unable to prefix columns.") -}} diff --git a/macros/tables/hub.sql b/macros/tables/hub.sql index 33b78ded4..2ba855795 100644 --- a/macros/tables/hub.sql +++ b/macros/tables/hub.sql @@ -10,9 +10,15 @@ See the License for the specific language governing permissions and limitations under the License. -#} - {%- macro hub(src_pk, src_nk, src_ldts, src_source, source_model) -%} + {{- adapter_macro('dbtvault.hub', src_pk=src_pk, src_nk=src_nk, + src_ldts=src_ldts, src_source=src_source, source_model=source_model) -}} + +{%- endmacro -%} + +{%- macro default__hub(src_pk, src_nk, src_ldts, src_source, source_model) -%} + {%- set source_cols = dbtvault.expand_column_list([src_pk, src_nk, src_ldts, src_source]) -%} -- Generated by dbtvault. @@ -26,7 +32,7 @@ STG_{{ loop.index|string }} AS ( SELECT DISTINCT {{ dbtvault.prefix(source_cols, 'a') }} FROM ( - SELECT {{ src_pk }}, {{ src_nk }}, {{ src_ldts }}, {{ src_source }}, + SELECT {{ source_cols | join(', ') }}, ROW_NUMBER() OVER( PARTITION BY {{ src_pk }} ORDER BY {{ src_ldts }} ASC diff --git a/macros/tables/link.sql b/macros/tables/link.sql index 9270a9999..d5aa0c2f3 100644 --- a/macros/tables/link.sql +++ b/macros/tables/link.sql @@ -10,10 +10,16 @@ See the License for the specific language governing permissions and limitations under the License. -#} - {%- macro link(src_pk, src_fk, src_ldts, src_source, source_model) -%} -{%- set source_cols = dbtvault.expand_column_list([src_pk, src_fk, src_ldts, src_source]) -%} + {{- adapter_macro('dbtvault.link', src_pk=src_pk, src_fk=src_fk, + src_ldts=src_ldts, src_source=src_source, source_model=source_model) -}} + +{%- endmacro %} + +{%- macro default__link(src_pk, src_fk, src_ldts, src_source, source_model) -%} + +{%- set source_cols = dbtvault.expand_column_list(columns=[src_pk, src_fk, src_ldts, src_source]) -%} {%- set fk_cols = dbtvault.expand_column_list([src_fk]) -%} -- Generated by dbtvault. @@ -59,12 +65,11 @@ STG AS ( {%- endif %} {%- endfor %} ) - {{ 'WHERE' -}} + {{ 'WHERE ' -}} {%- for fk in fk_cols -%} - {%- if not loop.last %} - {{ fk }} IS NOT NULL AND - {%- else %} {{ fk }} IS NOT NULL + {%- if not loop.last %} + {{ 'AND ' -}} {%- endif -%} {%- endfor %} ) AS b @@ -81,12 +86,11 @@ STG AS ( ORDER BY b.{{ src_ldts }}, b.{{ src_source }} ASC ) AS RN FROM {{ ref(source_model) }} AS b - {{ 'WHERE' -}} + {{ 'WHERE ' -}} {%- for fk in fk_cols -%} - {%- if not loop.last %} - b.{{ fk }} IS NOT NULL AND - {%- else %} b.{{ fk }} IS NOT NULL + {%- if not loop.last %} + {{ 'AND ' -}} {%- endif -%} {%- endfor %} ) AS a diff --git a/macros/tables/sat.sql b/macros/tables/sat.sql index 3e97103e8..fd9a92f28 100644 --- a/macros/tables/sat.sql +++ b/macros/tables/sat.sql @@ -10,10 +10,16 @@ See the License for the specific language governing permissions and limitations under the License. -#} - {%- macro sat(src_pk, src_hashdiff, src_payload, src_eff, src_ldts, src_source, source_model) -%} -{%- set source_cols = dbtvault.expand_column_list([src_pk, src_hashdiff, src_payload, src_eff, src_ldts, src_source]) -%} + {{- adapter_macro('dbtvault.sat', src_pk=src_pk, src_hashdiff=src_hashdiff, src_payload=src_payload, + src_eff=src_eff, src_ldts=src_ldts, src_source=src_source, source_model=source_model) -}} + +{%- endmacro %} + +{%- macro default__sat(src_pk, src_hashdiff, src_payload, src_eff, src_ldts, src_source, source_model) -%} + +{%- set source_cols = dbtvault.expand_column_list(columns=[src_pk, src_hashdiff, src_payload, src_eff, src_ldts, src_source]) -%} -- Generated by dbtvault. {% if not is_incremental() -%} diff --git a/macros/tables/t_link.sql b/macros/tables/t_link.sql index 5b9fac9b9..7c216a931 100644 --- a/macros/tables/t_link.sql +++ b/macros/tables/t_link.sql @@ -10,10 +10,16 @@ See the License for the specific language governing permissions and limitations under the License. -#} - {%- macro t_link(src_pk, src_fk, src_payload, src_eff, src_ldts, src_source, source_model) -%} -{%- set source_cols = dbtvault.expand_column_list([src_pk, src_fk, src_payload, src_eff, src_ldts, src_source])-%} + {{- adapter_macro('dbtvault.t_link', src_pk=src_pk, src_fk=src_fk, src_payload=src_payload, + src_eff=src_eff, src_ldts=src_ldts, src_source=src_source, source_model=source_model) -}} + +{%- endmacro %} + +{%- macro default__t_link(src_pk, src_fk, src_payload, src_eff, src_ldts, src_source, source_model) -%} + +{%- set source_cols = dbtvault.expand_column_list(columns=[src_pk, src_fk, src_payload, src_eff, src_ldts, src_source])-%} -- Generated by dbtvault. SELECT DISTINCT {{ dbtvault.prefix(source_cols, 'stg') }} From 507a24c904850b190217a66631aca1431d5cace5 Mon Sep 17 00:00:00 2001 From: Alex Higgs Date: Wed, 24 Jun 2020 18:06:27 +0100 Subject: [PATCH 3/7] Updated README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d32bd1743..40befaece 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,7 @@ Add the following to your ```packages.yml``` packages: - git: "https://github.com/Datavault-UK/dbtvault" - revision: v0.6 # Latest stable version + revision: v0.6.1 # Latest stable version ``` And run From bc0228476750893523df6dff840aa033cc5b9ff3 Mon Sep 17 00:00:00 2001 From: Alex Higgs Date: Thu, 6 Aug 2020 16:34:47 +0100 Subject: [PATCH 4/7] dbt_project.yml fix - Super minor fix which removes 0.17.x requirement for dbtvault. If using vars in dbt_project.yml, you still need to specify config-version: 1 in your own project's dbt_project.yml --- README.md | 8 ++++---- dbt_project.yml | 5 +---- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 40befaece..9466f59a4 100644 --- a/README.md +++ b/README.md @@ -42,20 +42,20 @@ Learn quickly with our worked example: ## Installation -Add the following to your ```packages.yml``` +Add the following to your `packages.yml` ```yaml packages: - git: "https://github.com/Datavault-UK/dbtvault" - revision: v0.6.1 # Latest stable version + revision: v0.6.2 # Latest stable version ``` And run -```dbt deps``` +`dbt deps` -[Read more on package installation](https://docs.getdbt.com/v0.15.0/docs/package-management) +[Read more on package installation](https://docs.getdbt.com/docs/building-a-dbt-project/package-management/#git-packages) ## Usage diff --git a/dbt_project.yml b/dbt_project.yml index a71afdd03..c82564bf0 100644 --- a/dbt_project.yml +++ b/dbt_project.yml @@ -1,10 +1,7 @@ name: 'dbtvault' -version: '0.6' +version: '0.6.2' require-dbt-version: [">=0.14.0", "<0.18.0"] -# WARNING: THIS MUST REMAIN VERSION 1 UNTIL FURTHER NOTICE -config-version: 1 - profile: 'dbtvault' source-paths: ["models", "models_test"] From e3c3f77eefa9cbf2838b333a8cf03bd36d190067 Mon Sep 17 00:00:00 2001 From: Alex Higgs Date: Thu, 17 Sep 2020 00:16:01 +0100 Subject: [PATCH 5/7] Update README.md Added circleci shield --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 9466f59a4..ff8b7eaaa 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,10 @@

+ Test Status Documentation Status +

+ [Changelog and past doc versions](https://dbtvault.readthedocs.io/en/latest/changelog/stable) # dbtvault by [Datavault](https://www.data-vault.co.uk) From 04f66628d739073e2cd5bc1e0efd88f1b116b5dc Mon Sep 17 00:00:00 2001 From: Alex Higgs Date: Thu, 17 Sep 2020 00:18:13 +0100 Subject: [PATCH 6/7] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ff8b7eaaa..7ad4f5439 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@

- Test Status From 6bb076828d37cedfef94414258e64a6cf22d6d10 Mon Sep 17 00:00:00 2001 From: Alex Higgs Date: Thu, 17 Sep 2020 00:19:45 +0100 Subject: [PATCH 7/7] Update README.md Remove CircleCI badge for now --- README.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/README.md b/README.md index 7ad4f5439..91aabc8f1 100644 --- a/README.md +++ b/README.md @@ -3,10 +3,6 @@

- Test Status