user2109254
user2109254

Reputation: 1759

How to log the result of a select query in tMysqlRow to tLogRow in Talend?

I have a simple job with two components tMysqlRow connected via Row/Main to tLogRow.

I have a simple select statement in the tMysqlRow component that I have tested directly on the db and it works and returns a single record. When I run the job it says "1 rows in 0.04s" so I assume that means that the tMysqlRow component is getting 1 row from the db.

In the tLogRow component I have pressed the "Sync columns" button on the basic tab and when I edit the schema I can see all the columns are there.

But when I run the job, it logs the following:

Starting job LoadContextVariablesFromDBRecordDemo at 13:07 30/09/2015.
[statistics] connecting to socket on port 3714
[statistics] connected

||||||

[statistics] disconnected
Job LoadContextVariablesFromDBRecordDemo ended at 13:07 30/09/2015. [exit code=0]

So I am at a loss for why the values are not logged?

What am I doing wrong here?

Regards,

Scott

Upvotes: 0

Views: 3549

Answers (1)

user2109254
user2109254

Reputation: 1759

So I got some advise from the talend forum telling me:

Do you really need to use tMysqlRow component? From what I understand, tMysqlInput is just the component you need. It directly returns the result of the query and propagates it into the flow. tMysqlRow component does not handle the returned data by default. In case you are restricted to use the tMysqlRow component, you have to check the Propagate QUERY's recordset in the Advanced settings of tMysqlRow component and then use the tParseRecordSet component to extract the data. For more information and guide, please, refer to the tMysqlRow Component Guide page. There is also an example on how to do this.

URL to the forum post

I had another issue after this was solved where the tMysqlInput component show a warning message:

the schema's dbType is not correct for this component

This was also solved in that same thread.

Regards,

Scott

Upvotes: 2

Related Questions