Skip to content

Commit

Permalink
Fixes #641 by using the svv_mv_info view which is queryable (#647)
Browse files Browse the repository at this point in the history
* 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)
  • Loading branch information
reptillicus authored and mikealfare committed Dec 1, 2023
1 parent 3168af0 commit ec4ecb3
Show file tree
Hide file tree
Showing 2 changed files with 10 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 @@ -13,9 +13,10 @@
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
-- svv_mv_info is queryable by Redshift Serverless, but stv_mv_info is not
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 ec4ecb3

Please sign in to comment.