From 842da105422f068a9ce4ec4005bbc50f736c7f7f Mon Sep 17 00:00:00 2001 From: Ayo Bamisile-Aje Date: Fri, 21 Aug 2020 17:46:12 -0400 Subject: [PATCH] Fix extension order of dbt_cmd --- airflow_dbt/hooks/dbt_hook.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/airflow_dbt/hooks/dbt_hook.py b/airflow_dbt/hooks/dbt_hook.py index debf63c..088271c 100644 --- a/airflow_dbt/hooks/dbt_hook.py +++ b/airflow_dbt/hooks/dbt_hook.py @@ -83,6 +83,12 @@ def run_cli(self, *command): if self.vars is not None: dbt_cmd.extend(['--vars', self._dump_vars()]) + + if self.data_test: + dbt_cmd.extend(['--data']) + + if self.schema_test: + dbt_cmd.extend(['--schema']) if self.models is not None: dbt_cmd.extend(['--models', self.models]) @@ -96,12 +102,6 @@ def run_cli(self, *command): if self.full_refresh: dbt_cmd.extend(['--full-refresh']) - if self.data_test: - dbt_cmd.extend(['--data']) - - if self.schema_test: - dbt_cmd.extend(['--schema']) - sp = subprocess.Popen( dbt_cmd, stdout=subprocess.PIPE,