From 98f0ebdfee6f2694e7abfb7051cf410cc46035e0 Mon Sep 17 00:00:00 2001 From: Jeremy Cohen Date: Mon, 27 Jul 2020 16:11:30 -0400 Subject: [PATCH] No columns, no problem --- macros/external/create_external_table.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/macros/external/create_external_table.sql b/macros/external/create_external_table.sql index f675ec64..2e10cb9f 100644 --- a/macros/external/create_external_table.sql +++ b/macros/external/create_external_table.sql @@ -68,7 +68,7 @@ {# https://docs.snowflake.net/manuals/sql-reference/sql/create-external-table.html #} {# This assumes you have already created an external stage #} create or replace external table {{source(source_node.source_name, source_node.name)}} - {%- if columns|length > 0 or partitions|length > 0 -%} + {%- if columns or partitions -%} ( {%- if partitions -%}{%- for partition in partitions %} {{partition.name}} {{partition.data_type}} as {{partition.expression}}{{- ',' if columns|length > 0 -}}