Skip to content

Commit

Permalink
Merge pull request #1686 from fishtown-analytics/fix/panoply
Browse files Browse the repository at this point in the history
Fix for run and docs generate on Panoply Redshift
  • Loading branch information
drewbanin authored Aug 19, 2019
2 parents e78d979 + 7a01ba7 commit 64ee763
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
12 changes: 7 additions & 5 deletions plugins/postgres/dbt/include/postgres/macros/relations.sql
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
{% macro postgres_get_relations () -%}

{#
-- in pg_depend, objid is the dependent, refobjid is the referenced object
-- > a pg_depend entry indicates that the referenced object cannot be
-- > dropped without also dropping the dependent object.
#}

{%- call statement('relations', fetch_result=True) -%}
-- {#
-- in pg_depend, objid is the dependent, refobjid is the referenced object
-- "a pg_depend entry indicates that the referenced object cannot be dropped without also dropping the dependent object."
-- #}
-- {# this only works with the current database #}
with relation as (
select
pg_rewrite.ev_class as class,
Expand Down
2 changes: 1 addition & 1 deletion plugins/redshift/dbt/include/redshift/macros/adapters.sql
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
numeric_precision,
numeric_scale

from {{ relation.information_schema('columns') }}
from information_schema."columns"
where table_name = '{{ relation.identifier }}'
),

Expand Down
6 changes: 3 additions & 3 deletions plugins/redshift/dbt/include/redshift/macros/catalog.sql
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@

),

columns as (
table_columns as (

select
'{{ database }}'::varchar as table_database,
Expand All @@ -74,15 +74,15 @@
null::varchar as column_comment


from information_schema.columns
from information_schema."columns"

),

unioned as (

select *
from tables
join columns using (table_database, table_schema, table_name)
join table_columns using (table_database, table_schema, table_name)

union all

Expand Down

0 comments on commit 64ee763

Please sign in to comment.