From 6e6d9e069257bca8e86921834032a09f4555ad27 Mon Sep 17 00:00:00 2001 From: airbyte Date: Fri, 13 May 2022 08:47:43 +0000 Subject: [PATCH 1/4] fix: postgres string type --- .../dbt-project-template/macros/cross_db_utils/datatypes.sql | 3 +++ 1 file changed, 3 insertions(+) diff --git a/airbyte-integrations/bases/base-normalization/dbt-project-template/macros/cross_db_utils/datatypes.sql b/airbyte-integrations/bases/base-normalization/dbt-project-template/macros/cross_db_utils/datatypes.sql index 18e2d61ecb8c..a9b7c7e31e45 100644 --- a/airbyte-integrations/bases/base-normalization/dbt-project-template/macros/cross_db_utils/datatypes.sql +++ b/airbyte-integrations/bases/base-normalization/dbt-project-template/macros/cross_db_utils/datatypes.sql @@ -59,6 +59,9 @@ String {%- endmacro -%} +{%- macro postgres__type_string() -%} + text +{%- endmacro -%} {# float ------------------------------------------------- #} {% macro mysql__type_float() %} From 6e49252ab74bba30cd57bdd7250d43c3610926ca Mon Sep 17 00:00:00 2001 From: Leon Stefani Date: Wed, 18 May 2022 11:40:47 +0200 Subject: [PATCH 2/4] feat: added TODO for removal --- .../dbt-project-template/macros/cross_db_utils/datatypes.sql | 1 + 1 file changed, 1 insertion(+) diff --git a/airbyte-integrations/bases/base-normalization/dbt-project-template/macros/cross_db_utils/datatypes.sql b/airbyte-integrations/bases/base-normalization/dbt-project-template/macros/cross_db_utils/datatypes.sql index a9b7c7e31e45..677524a9aa14 100644 --- a/airbyte-integrations/bases/base-normalization/dbt-project-template/macros/cross_db_utils/datatypes.sql +++ b/airbyte-integrations/bases/base-normalization/dbt-project-template/macros/cross_db_utils/datatypes.sql @@ -59,6 +59,7 @@ String {%- endmacro -%} +{# TODO: Remove this macro when dbt issue regarding unlimited varchars on postgres is resolved (https://github.com/airbytehq/airbyte/issues/12775) #} {%- macro postgres__type_string() -%} text {%- endmacro -%} From 3262861e6fc8aac30371abfcaca882844d052eec Mon Sep 17 00:00:00 2001 From: Leon Stefani Date: Wed, 18 May 2022 11:45:01 +0200 Subject: [PATCH 3/4] fix: better comment style --- .../dbt-project-template/macros/cross_db_utils/datatypes.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/airbyte-integrations/bases/base-normalization/dbt-project-template/macros/cross_db_utils/datatypes.sql b/airbyte-integrations/bases/base-normalization/dbt-project-template/macros/cross_db_utils/datatypes.sql index 677524a9aa14..d0de89ffdb18 100644 --- a/airbyte-integrations/bases/base-normalization/dbt-project-template/macros/cross_db_utils/datatypes.sql +++ b/airbyte-integrations/bases/base-normalization/dbt-project-template/macros/cross_db_utils/datatypes.sql @@ -59,7 +59,7 @@ String {%- endmacro -%} -{# TODO: Remove this macro when dbt issue regarding unlimited varchars on postgres is resolved (https://github.com/airbytehq/airbyte/issues/12775) #} +{#-- TODO: Remove this macro when dbt issue regarding unlimited varchars on postgres is resolved (https://github.com/airbytehq/airbyte/issues/12775) --#} {%- macro postgres__type_string() -%} text {%- endmacro -%} From be0c070274439aa2735386bd626e32213e1405f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9on=20Stefani?= Date: Tue, 24 May 2022 09:52:41 +0200 Subject: [PATCH 4/4] Update airbyte-integrations/bases/base-normalization/dbt-project-template/macros/cross_db_utils/datatypes.sql Added the dbt upgrade condition to TODO Co-authored-by: Edward Gao --- .../dbt-project-template/macros/cross_db_utils/datatypes.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/airbyte-integrations/bases/base-normalization/dbt-project-template/macros/cross_db_utils/datatypes.sql b/airbyte-integrations/bases/base-normalization/dbt-project-template/macros/cross_db_utils/datatypes.sql index d0de89ffdb18..d03bf3613dc4 100644 --- a/airbyte-integrations/bases/base-normalization/dbt-project-template/macros/cross_db_utils/datatypes.sql +++ b/airbyte-integrations/bases/base-normalization/dbt-project-template/macros/cross_db_utils/datatypes.sql @@ -59,7 +59,7 @@ String {%- endmacro -%} -{#-- TODO: Remove this macro when dbt issue regarding unlimited varchars on postgres is resolved (https://github.com/airbytehq/airbyte/issues/12775) --#} +{#-- TODO: Remove this macro when dbt issue regarding unlimited varchars on postgres is resolved (https://github.com/dbt-labs/dbt-core/issues/5238) and we've upgraded to the latest version of dbt --#} {%- macro postgres__type_string() -%} text {%- endmacro -%}