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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

copy database

Hello,
I have 2 databases. They are le same tables, same name and structure. But in the second database for each table, I add 2 columns (ID autoinc, DB_NAME)
I would like to create a job wich take the all table of the first DB (automatically) and insert data in the same table of my second DB and add in the column DB_NAME, a constant (for example : "DATABASE_1")
But I don't know how I can do 😕
Can you help me please ???
Sorry for my english 😕
Labels (2)
13 Replies
Anonymous
Not applicable
Author

in a tMap output table, along with all the original columns from your source db, add an extra output column (1) (very bottom of tmap interface) and put "DATABASE_1" in the input cell for this new column (2).
Anonymous
Not applicable
Author

Yes, I know, I already use this method but I would like a method which run all tables of my database
Anonymous
Not applicable
Author

Hello
ut I would like a method which run all tables of my database

You can use a tMysqlTableList to list all the tables and iterate each one.
Best regards
shong
Anonymous
Not applicable
Author

Thank you for your help.
I have not again test your solution bu I would like an information on the picture2.
In the label "Query", What can I write as instruction because according to the tables, the requests aren't the same.
And last question, in the tmap component, no mapping ? it's automatically ? (look my picture)

Thank you.
Anonymous
Not applicable
Author

Hello Flavien
If the tables don't the same structure(schema), we can't use this solution. as we must define the schema manually before running the job.
Best regards
shong
Anonymous
Not applicable
Author

:/
BD1, Table1 have same structure than DB2, Table1
But BD1, Table1 haven't same structure than DB1, Table2
DB2 is a copy of DB1 with 2 more columns (ID, BDD_NAME).
In DB1, there are more 70 tables 😕 So I would like to use a method wich run all tables af DB1 and insert in table correspondig and adding a constant for the column BDD_NAME.
Have you an idea ?
Thank you
Anonymous
Not applicable
Author

I have an idea :
1/ I list tables in my DB1,
2/ and after I list column in my DB1.
3/ I use this result for my request "SELECT" in my DB1
4/ And I insert datas in my DB2.
But I have a problem with step 3 and step 4
Step 3 (tMMSqlInput2) :
The result of listing column is an array ? It's necessary to explode this result for use it in my request ?
Step 4 (tMSSqlRow_1) :
How can I do to insert data in my DB2 ?

Thank you so much
Anonymous
Not applicable
Author

Can you help me ?
Anonymous
Not applicable
Author

Does Talend MDM provides us with databse synchronization?