From 1e9a47b6dbe4ac70c5cb2f75b7d26ba89eb1c306 Mon Sep 17 00:00:00 2001 From: Jeremy Cohen Date: Thu, 7 Jan 2021 16:21:38 +0100 Subject: [PATCH 1/2] Handle 'response' in v0.19.0. Use pre for testing --- macros/common/stage_external_sources.sql | 5 +++-- run_test.sh | 8 ++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/macros/common/stage_external_sources.sql b/macros/common/stage_external_sources.sql index 50e00ca6..e9a59778 100644 --- a/macros/common/stage_external_sources.sql +++ b/macros/common/stage_external_sources.sql @@ -55,8 +55,9 @@ {{ exit_txn }} {{ q }} {% endcall %} - {% set status = load_result('runner')['status'] %} - {% do dbt_utils.log_info(loop_label ~ ' (' ~ loop.index ~ ') ' ~ status) %} + {% set runner = load_result('runner') %} + {% set log_msg = runner['response'] if response in runner.keys() else runner['status'] %} + {% do dbt_utils.log_info(loop_label ~ ' (' ~ loop.index ~ ') ' ~ log_msg) %} {% endfor %} diff --git a/run_test.sh b/run_test.sh index 2ac82aa6..db5b196b 100755 --- a/run_test.sh +++ b/run_test.sh @@ -7,15 +7,15 @@ if [[ ! -f $VENV ]]; then pip install --upgrade pip setuptools if [ $1 == 'databricks' ] then - pip install dbt-spark[ODBC] --upgrade + pip install --pre dbt-spark[ODBC] --upgrade elif [ $1 == 'synapse' ] then - pip install dbt-synapse --upgrade + pip install --pre dbt-synapse --upgrade elif [ $1 == 'azuresql' ] then - pip install dbt-sqlserver --upgrade + pip install --pre dbt-sqlserver --upgrade else - pip install dbt --upgrade + pip install --pre dbt --upgrade fi fi From bd342928b3e1aa4516eca1947a5dd9441d281071 Mon Sep 17 00:00:00 2001 From: Jeremy Cohen Date: Thu, 7 Jan 2021 16:25:12 +0100 Subject: [PATCH 2/2] Fix typo --- macros/common/stage_external_sources.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/macros/common/stage_external_sources.sql b/macros/common/stage_external_sources.sql index e9a59778..6a3f8707 100644 --- a/macros/common/stage_external_sources.sql +++ b/macros/common/stage_external_sources.sql @@ -56,7 +56,7 @@ {% endcall %} {% set runner = load_result('runner') %} - {% set log_msg = runner['response'] if response in runner.keys() else runner['status'] %} + {% set log_msg = runner['response'] if 'response' in runner.keys() else runner['status'] %} {% do dbt_utils.log_info(loop_label ~ ' (' ~ loop.index ~ ') ' ~ log_msg) %} {% endfor %}