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 😕
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).
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)
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
:/
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
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 ?