Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Write Table now available in Qlik Cloud Analytics: Read Blog
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Copy data from multiple tables in one database to another

I need to copy data from multiple tables in DB1 to the corresponding tables in DB2 (while keeping the existing data in DB2 intact).
While doing this I need to keep the foreign key relationships in DB1 without overwriting data in DB2.
Tables in DB2 may have existing primary key values same as DB1, so while writing data into DB2 new primary key values need to be generated and used wherever they are referenced as foreign keys.
Can this be done using Talent enterprise data integration? If so, how do I go about it?
Both DB1 and DB2 are MySQL databases and have the same schema.
Labels (3)
4 Replies
Anonymous
Not applicable
Author

Hi,
It seems you are looking for "Migration DB"? If so, could you please take a look at a related https://community.talend.com/t5/Design-and-Development/complete-migration-from-oracle-to-sql-server/...? Let me know if it is OK with you.
Best regards
Sabrina
Anonymous
Not applicable
Author

Hi Sabrina,
It is not plain migration as I have data in my target database which might have the same primary key values as the source DB which I do not want to overwrite. I want to generate new primary key values while writing into the target DB and also maintain the foreign key references from the source DB for these newly generated primary keys.
Anonymous
Not applicable
Author

Hi pbhat,
Using system variable Sequence Generator you can generate a primary key...
You will have to write talend jobs for each table with tMap component for generation of key and other transformation if you have any
You can either design multiple subjobs to perform table migration or use single job for all the tables with onSubJobOk link...
There is no need to go for Enterprise edition as it is a plan database migration activity...
Can you pl elaborate simple example with couple of rows from source and what you expect in target... this will help to better understand your scenario..
Thanks
Vaibhav
Anonymous
Not applicable
Author

Hi all,
I want to copy file from one location to another location but if a file with same name exists in target location ,how can I append data to target location file ?
Thanks and Regards