Menu

1 / 7

MongoDB to Redshift Without a Load Job: A Change Stream Tutorial on AWS Glue

DEV Community: database·Shubham Baldava·10 days ago
#2rDRt7Mf
#devtodatabase#devto#dev#redshift#glue
Long article (3181 words) — no AI summary yet.
Reading 0:00
15s threshold

Two questions sit inside every MongoDB to Redshift project. What does a document look like once it is a row in a SQL warehouse? And how does an order that was edited an hour after the first copy ever get there?

A first attempt usually answers neither. A script exports the collection, COPY loads the file, and the edit shows up tomorrow, provided the whole table is reloaded.

These are the routes people usually take:

mongoexport to JSON, then COPY . You keep a script, a scheduler and a staging bucket. Freshness is hours to daily, and only full reloads are possible, so an update or a delete never arrives as a change.

AWS Database Migration Service (DMS) with its MongoDB source . Change data capture (CDC) through the oplog or change streams into native Redshift tables, in document mode or table mode. You run a replication instance and a task, plus a staging bucket in Amazon Simple Storage Service (S3).

Debezium, Kafka and a Redshift sink. Changes land within seconds.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.