loading data from Redshift to Postgre SQL
Hi All,
I have table in Redshift with columns A,B,C and I want to add this table data to another table in Postgre SQL without deleting records in postgresql.
Is it possible in Dataiku.
Example-
Redshift Table
employee Table with Columns A,B,C
Postgresql Table
Employee table with columns X,Y,Z
I want to add A column values to X ,B to Y and C to Z
I have only redshift connection in dataiku.
Answers
-
Alexandru Dataiker, Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer, Registered Posts: 1,226 Dataiker
Hi,
You will likely need to use code to achieve this. By default, DSS will drop the table if you are to sync from Redshift to Postgres. You can opt to perform append on the output; this would work if the schema matches between Redshift and postgres table. This doesn't appear to be the case here.
An option is to handle the inserts using SQLExecutor2 ( see page 23)
https://pages.dataiku.com/hubfs/Interfacing%20with%20SQL%20in%20Python.pdf
Thanks