From 781dfe318f36c6934d275fb5a5b0c5625d72993f Mon Sep 17 00:00:00 2001 From: Jessie Chen Date: Wed, 12 Jul 2023 10:39:28 -0700 Subject: [PATCH] remove overriding list_relations_without_caching and rewrite the sql query --- dbt/include/redshift/macros/adapters.sql | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/dbt/include/redshift/macros/adapters.sql b/dbt/include/redshift/macros/adapters.sql index d5a52c661..f5fc89db8 100644 --- a/dbt/include/redshift/macros/adapters.sql +++ b/dbt/include/redshift/macros/adapters.sql @@ -223,17 +223,6 @@ {{ return(sql_convert_columns_in_relation(table)) }} {% endmacro %} - - -{% macro redshift__information_schema_name(database) -%} - {{ return(postgres__information_schema_name(database)) }} -{%- endmacro %} - - -{% macro redshift__list_schemas(database) -%} - {{ return(postgres__list_schemas(database)) }} -{%- endmacro %} - {% macro redshift__list_relations_without_caching(schema_relation) %} {% call statement('list_relations_without_caching', fetch_result=True) -%} @@ -261,6 +250,15 @@ {{ return(load_result('list_relations_without_caching').table) }} {% endmacro %} +{% macro redshift__information_schema_name(database) -%} + {{ return(postgres__information_schema_name(database)) }} +{%- endmacro %} + + +{% macro redshift__list_schemas(database) -%} + {{ return(postgres__list_schemas(database)) }} +{%- endmacro %} + {% macro redshift__check_schema_exists(information_schema, schema) -%} {{ return(postgres__check_schema_exists(information_schema, schema)) }} {%- endmacro %}