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.…