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) .
  • Data Integration
Tags (1)
5 REPLIES
Six 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

 

 

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
Six 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

Five Stars dgm
Five 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

Nine 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.