Five Stars

migrate my 1000 tables structures from one database to another database in an single run ?

Do we have any option in talend to migrate my 1000 tables structures from one database to another database in an single run? since my dynamic schema option is not working for this (dynamic schema option only works when the source is having a data) .
Tags (1)
6 REPLIES
Seven Stars

Re: migrate my 1000 tables structures from one database to another database in an single run ?

Hi,

 

you can copy tables using below job.

 

parameterize your source db and target db.

 

put the below query in tOracleRow component

 

"create table "+context.tgt_db_name+"."+((String)globalMap.get("tOracleTableList_1_CURRENT_TABLE"))+" as select * from "+context.src_db_name+"."+((String)globalMap.get("tOracleTableList_1_CURRENT_TABLE"))+" where 1=0;"

 

 

10.JPG

 

 

Thanks,
Sid
Mark as solution if this resolved your issue
Five Stars

Re: migrate my 1000 tables structures from one database to another database in an single run ?

Hi Sid4U, Thanks for your input on this, but i am unable see your screenshot , can you explain me in detail ? or update a attachment. Thanks
Seven Stars

Re: migrate my 1000 tables structures from one database to another database in an single run ?

I can clearly see the image in my previous post. anyway attaching again10.JPG

Thanks,
Sid
Mark as solution if this resolved your issue
Six Stars dgm
Six Stars

Re: migrate my 1000 tables structures from one database to another database in an single run ?

I'm not sure that job will work since we are dealing with only one database.

 

What's about copying structure from Oracle database to MySQL database? Or maybe two different instance Oracle DB

Ten Stars

Re: migrate my 1000 tables structures from one database to another database in an single run ?

As he said:
parameterize your source db and target db.

Where you send the data is up to you.
Six Stars dgm
Six Stars

Re: migrate my 1000 tables structures from one database to another database in an single run ?

My suggestion :

 

toracleTable_list --- iterate ---> toracleinput(schema should be dynamic) ------- main ----------> toracleoutput / tmysqloutput (schema should be dynamic)

 

You will get tables name from toracletable_list