Redshift Serverless: error when creating materialized view from glue data catalog

0

I try to create a materialized view based on an external table in the glue data catalog. Quering the Schema and tables of the data catalog work like expected. Also the creation of normal views work. Just if I want to create a materialized view, I get an error I have no idea how to solve.

Here is the sql I use to create the view

CREATE MATERIALIZED VIEW "dev"."public"."table_name" AS
SELECT DISTINCT *
FROM "awsdatacatalog"."my_db"."table_name" 

And this is the error:

ERROR: Trying to make internal datasharing request for auto mounted catalog. Detail: ----------------------------------------------- error: Trying to make internal datasharing request for auto mounted catalog. code: 4 context: query: -1[child_sequence:1] location: redcat_rpc_client.cpp:1559 process: padbmaster
Mario
gefragt vor 4 Monaten336 Aufrufe
1 Antwort
0

Redshift materialized views have limitation on late-binding references to objects. The auto mounted Glue catalog falls under this category and thus you are encountering the error. Even if the MV would have succeeded it cannot be auto refreshed and will go through a full refresh every time. So, instead of MV, you can create a regular table and built your refresh logic as necessary.

profile pictureAWS
beantwortet vor 4 Monaten

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen