• Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » Insert custom SQL code in mapping

#1 2012-06-08 10:53:22

stephan_ms
New member
Registered: 2012-06-08
Posts: 3

Insert custom SQL code in mapping

Tags: [mysql]

Hi everyone,

I'm new to TOS and struggling with inserting some manual SQL code. Essentially, I have a source SQL table containing messages between users and a target SQL table threads. Each message has a thread_id which connects the message to the corresponding thread.

The thread table has an attribute num_messages which indicates the number of message that the thread contains. I created a t_Map that connects both tables. Where and how can I insert the SQL statement that calculates the number of messages and inserts the value in the num_messages attribute of the thread table?

I thought about the expression editor, however, it seems to be the case that I can only enter Java statements.

Thanks for your help,
Stephan


Uploaded Images

Offline

#2 2012-06-08 11:06:56

pedro
Member
Registered: 2011-11-17
Posts: 3682

Re: Insert custom SQL code in mapping

Hi

Welcome to Talend Community!

You might modify the tMysqlInput component as the following images.

Regards,
Pedro


Uploaded Images


Only Paranoid Survive.

Offline

#3 2012-06-08 22:21:44

stephan_ms
New member
Registered: 2012-06-08
Posts: 3

Re: Insert custom SQL code in mapping

Hi Pedro,

thanks a lot for your help - it works perfectly :-)

Best regards,
Stephan

Offline

  • Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » Insert custom SQL code in mapping

Board footer

Powered by FluxBB