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?

질문됨 일 년 전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
답변함 일 년 전
profile picture
전문가
검토됨 한 달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠