In this Page
|Table of Contents|
I want to replicate one or more tables from a source database in RedShift.
For this scenario, the following Snaps are used:
- a DB Select Snap, such as MySQL Select
- a Redshift Insert/Bulk Load Snap
Replicating a table is done using the Select and Insert/Bulk Load Snaps. The rows are sent out the main output view and then a second output view is used to pass the schema. Here are the steps to follow to build the pipeline:
To replicate multiple tables, you can use the Redshift Table List Snap to get the list of tables for a schema. You can then use a ForEach Snap to run the above pipeline using the table name as the parameter.
The DB Select Snaps support a second output view that is used to send out the database schema. The database schema is basically the dump of the JDBC metadata returned by the getTables(), getColumns(), getIndexInfo(), and getImportedKeys() methods. You can read more about these methods at: http://docs.oracle.com/javase/7/docs/api/java/sql/DatabaseMetaData.html