Skip to content

Commit

Permalink
[Backport 1.6.latest] Fixes #641 by using the svv_mv_info view which …
Browse files Browse the repository at this point in the history
…is queryable (#691)

* Fixes #641 by using the svv_mv_info view which is queryable (#647)

* Hopefully fixes #641 by using the svv_mv_info view which is queryable in redshift-serverless

* Changelog entry

* Explain rationale in a comment to reduce possibility of an accidental reversion

---------

Co-authored-by: Doug Beatty <[email protected]>
Co-authored-by: Doug Beatty <[email protected]>
Co-authored-by: Mike Alfare <[email protected]>
Co-authored-by: colin-rogers-dbt <[email protected]>

(cherry picked from commit 058a3ff)

* manually apply backported updates of #647 to macro that was moved between 1.6 and 1.7

---------

Co-authored-by: reptillicus <[email protected]>
  • Loading branch information
mikealfare and reptillicus authored Dec 15, 2023
1 parent 754e559 commit 4122399
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
6 changes: 6 additions & 0 deletions .changes/unreleased/Fixes-20231026-164623.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Fixes
body: Fix describe_materialized_view for Redshift Serverless
time: 2023-10-26T16:46:23.253837-06:00
custom:
Author: reptillicus
Issue: "641"
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@
tb.sortkey1,
mv.autorefresh
from svv_table_info tb
left join stv_mv_info mv
on mv.db_name = tb.database
and mv.schema = tb.schema
left join svv_mv_info mv
on mv.database_name = tb.database
and mv.schema_name = tb.schema
and mv.name = tb.table
where tb.table ilike '{{ relation.identifier }}'
and tb.schema ilike '{{ relation.schema }}'
Expand Down

0 comments on commit 4122399

Please sign in to comment.