One Star

transfer multiple tables data from sql server to mysql db

I have multiple questions.
I am using Talend Open Studio 5.3 version.

Q1:
I am trying to transfer multiple tables? data from Sql Server to MYSQL DB.
If I create a tMSSqlInput -> tMysqlOutput with a fixed table name in the Input and the propagation of the schema to the output, the job works fine.
However my work is not limited to one table but list of tables those I configure thru a XML file. When I dynamically handle this task I get below error.
Exception in thread "main" java.lang.Error: java.lang.Error: Unresolved compilation problems:
pstmt_tMysqlOutput_1 cannot be resolved
batchSizeCounter_tMysqlOutput_1 cannot be resolved to a variable
batchSize_tMysqlOutput_1 cannot be resolved to a variable
batchSizeCounter_tMysqlOutput_1 cannot be resolved to a variable
pstmt_tMysqlOutput_1 cannot be resolved
Q2:
I wanted to find out how can we iterate thru multiple source tables (configured in XML) and populate same in destination.
Q3:
Is there any built-in mechanism available to log the data transfer details.
Q4:
How do we start jobs from point of failure? Is there any built-in mechanism available?
1 REPLY
Community Manager

Re: transfer multiple tables data from sql server to mysql db

Hi
Q1, this is a compilation error, there must be something wrong in the component setting tMysqlOutput, if you open the code tab, you will see which line has the error and what's the error message.
Q2, do all tables have the same structure? the same number of columns and the same data type? If so, you just need to create a single job for all tables, the job design looks like:
tFileInputXML--main(row1)--tFlowToIterate--iterate--tMssqlInput--main--tMysqlOutput
tFlowToIterate is used to iterate each row, in this case, it iterates each table, you can use the current table name in DB component like row1.tableName
If the tables have different structure, you have to use dynamic schema, see
https://help.talend.com/pages/viewpage.action?pageId=5671283
However, this feature is only available in Talend Enterprise subscription product.
Q3, you can use tFlowMeterCatcher to capture the number of processed data, tLogCather to capture the error message and the tStatCatcher to capture the job statistics, including job start time, end time, execution status etc.
Q4, seeError Recovery feature.
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business