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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Banupriya
Contributor III
Contributor III

Load multiple tables from source to target

Hi,

Thank you for your reply.

We have set of tables to be loaded from source to target databse. It's not a simple data migration but the source and target database tables should be in sync on daily basis. So for some table we have to do insert or update as well.

We have defined a dynamic schema in the tdbinput and fetched the select query dynamically for the source db and inserted the data to target db using tdboutput dynamic schema.

Issue comes when we have to insert or update the data in tdboutput. ​It's required key columns for this operation. But due do dynamic schema we can not define key column dynamically. Also key column is different for different table.

How to set the key columns dynamically in tdboutput? .

We have tried with tdbrow and fetched the merge query dynamically to do this insert or update. But in tdbrow we can select one db at a time so it's not getting tables from source DB.

Is there any other way to achieve this? 

Labels (3)
1 Reply
Anonymous
Not applicable

Hi

If the data of the two tables needs to be synchronized and kept consistent, consider deleting all of the data from target table before inserting all data from source data to target table, this is more efficient than 'insert or update 'data.

 

Regards

Shong