Santhosh Gandhe
Santhosh Gandhe

Reputation: 6960

What is the best component to use, If I want to create a table from my talend job?

From my job, I am trying to create a Table ( if not exists ) with selecting few records by joining few tables ( like create table xx select * from t1 inner t2 etc ), from my talend job. I am using tMysqlRow component. I am not sure, is it the right component to use for DDL operations ..!! Please suggest the right component to use.

Using tMysqlRow, is sometimes working fine but not consistent. Some times it is failing with "java.sql.SQLException: Lock wait timeout exceeded; try restarting transaction". Is it because of my query is taking too long time, or using tMysqlRow for DDL operation is wrong ? Where am I doing it wrong ?

Upvotes: 1

Views: 623

Answers (1)

Santhosh Gandhe
Santhosh Gandhe

Reputation: 6960

I am able to figure out issue. The issue is that, I am trying to drop the table in a tMysqlRow component and connecting that to another tMysqlRow to create it again. and These two are not working out of a single tMysqlConnection object. so One is waiting for the other one to commit.

Once, I made both these tMySqlRow components to work with the same tMySqlConnection object, the issue got resolved.

The point to learn here is , all of they should work out of the same connection object.

Upvotes: 2

Related Questions