From 7bf722bce92ec497498803627206202718660ddc Mon Sep 17 00:00:00 2001 From: Steven Meltser Date: Mon, 10 Jan 2022 00:56:29 -0500 Subject: [PATCH] set BACKUP parameter before dist/sort keys --- dbt/include/redshift/macros/adapters.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbt/include/redshift/macros/adapters.sql b/dbt/include/redshift/macros/adapters.sql index e81e823df..e82931857 100644 --- a/dbt/include/redshift/macros/adapters.sql +++ b/dbt/include/redshift/macros/adapters.sql @@ -45,9 +45,9 @@ create {% if temporary -%}temporary{%- endif %} table {{ relation.include(database=(not temporary), schema=(not temporary)) }} + {% if backup == false -%}backup no{%- endif %} {{ dist(_dist) }} {{ sort(_sort_type, _sort) }} - {% if backup == false -%}backup no{%- endif %} as ( {{ sql }} );