From 9efcc659c358ddf9ac00394cac4c666ccb3cc8bd Mon Sep 17 00:00:00 2001 From: Wilson Urdaneta Date: Mon, 25 Apr 2022 15:30:39 +0800 Subject: [PATCH 1/2] Fixing bug with create_resources macro and internal_stage parameter --- README.md | 2 +- macros/create_resources.sql | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index db749de..660ce02 100644 --- a/README.md +++ b/README.md @@ -179,7 +179,7 @@ dbt run --full-refresh --select dbt_dataquality.tests ## TODO - Adding testing suite - Adding more complex downstream metrics on Data Quality Coverage -- When the time is right, adding support for old and new [dbt artifacts schema versions](https://docs.getdbt.com/reference/artifacts/dbt-artifacts), currently on v3 is supported +- When the time is right, adding support for old and new [dbt artifacts schema versions](https://docs.getdbt.com/reference/artifacts/dbt-artifacts), currently only v3 is supported ## License All the content of this repository is licensed under the [**Apache License 2.0**](https://github.com/Divergent-Insights/dbt-dataquality/blob/main/LICENSE) diff --git a/macros/create_resources.sql b/macros/create_resources.sql index c68a2ff..80dcfec 100644 --- a/macros/create_resources.sql +++ b/macros/create_resources.sql @@ -1,8 +1,8 @@ -{% macro create_resources(dry_run=False, create_internal_stage=True) %} +{% macro create_resources(dry_run=False, internal_stage=True) %} {{ create_schema(dry_run) }} - {% if create_internal_stage %} + {% if internal_stage %} {{ create_internal_stage(dry_run) }} {% endif %} From 2b32c948712ce68be9acf51720c02ec27fd47a96 Mon Sep 17 00:00:00 2001 From: Wilson Urdaneta Date: Mon, 25 Apr 2022 15:32:44 +0800 Subject: [PATCH 2/2] Updating readme to include renamed parameter for internal stages creation --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 660ce02..aa1d22c 100644 --- a/README.md +++ b/README.md @@ -102,8 +102,8 @@ For example, the macro `load_log_sources` loads sources.json and manifest.json a ### Loading log files - External Stage To load data from an external stage, you must: - Workout on your own how to create, configure and load the data to the external stage - - In this case, when running the `create_resources` macro set the parameter `create_internal_stage` to `False` - - For example: `dbt run-operation create_resources --args '{create_internal_stage: False}'` + - In this case, when running the `create_resources` macro set the parameter `internal_stage` to `False` + - For example: `dbt run-operation create_resources --args '{internal_stage: False}'` - Set the package variable `dbt_dataquality_stage: my_external_stage` (as described at the beginning of the Usage section) - When running the `load_log_sources` and `load_log_tests` macros set the parameter `load_from_internal_stage` to `False` - For example: `dbt run-operation load_log_sources --args '{load_from_internal_stage: False}'`