From ee317144068af424d1a5e4f56ec009c2ee723081 Mon Sep 17 00:00:00 2001 From: Oleksandr Kot Date: Wed, 23 Aug 2023 12:38:46 +0300 Subject: [PATCH] Fix add varbinary column type for iceberg tables --- dbt/include/athena/macros/utils/ddl_dml_data_type.sql | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/dbt/include/athena/macros/utils/ddl_dml_data_type.sql b/dbt/include/athena/macros/utils/ddl_dml_data_type.sql index ec726627..ddd0fcb0 100644 --- a/dbt/include/athena/macros/utils/ddl_dml_data_type.sql +++ b/dbt/include/athena/macros/utils/ddl_dml_data_type.sql @@ -18,8 +18,14 @@ {%- endif -%} -- transform timestamp - {%- if table_type == 'iceberg' and 'timestamp' in data_type -%} - {% set data_type = 'timestamp' -%} + {%- if table_type == 'iceberg' -%} + {%- if 'timestamp' in data_type -%} + {% set data_type = 'timestamp' -%} + {%- endif -%} + + {%- if 'binary' in data_type -%} + {% set data_type = 'binary' -%} + {%- endif -%} {%- endif -%} {{ return(data_type) }}