Redshift Streaming Ingestion From Kinesis: New Column in Materialized View?

0

I recently added a new key/value pair in the JSON I'm sending to my Kinesis stream that I want to propagate to my Redshift "table" (materialized view). I understand that DDL is not possible in this scenario, so I believe I am stuck with creating a new materialized view entirely?

What is the best approach for preserving the data I have collected in the current materialized view thus far (~150M records over a few months) in order to INSERT/UNION into my new materialized view (with the additional column) once it is up and running?

質問済み 1年前473ビュー
1回答
1
承認された回答

You're correct that you can't directly alter the schema of the existing materialized view. Instead, you'll need to create a new materialized view that includes the additional column.

The most straight-forward approach would be to create a new table in Redshift with the same structure as the materialized view. Then, copy data from the materialized view into the newly created table. You may want to do this in batches depending on the size so you don't run into resource constraints. Once the data are set up, keep you data in sync with automatic inserts or unions from the Kinesis stream. You should then be able to run queries on the table with the updated column.

profile pictureAWS
エキスパート
pechung
回答済み 1年前
profile picture
エキスパート
レビュー済み 1ヶ月前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ