how to pass in params to stored procedure

One Star

how to pass in params to stored procedure

Hi, I need to pass two input params to a stored procedure and I don't know how to do it.
For the call to the stored procedure I'm using tJDBCSP component and my two params come from the context of the job so I can't create an schema.
I've read that you have to use a tMap to create the schema but I don't have any input to pass to the tMap component, I call the stored procedure after another job has finished.
Does anyone know how to do it?
Thx
Community Manager

Re: how to pass in params to stored procedure

Hello
Using the tRowGenerate component to generate one rows base on context param. see the screenshot.
Best regards
shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: how to pass in params to stored procedure

Thanks, it was very helpful
One Star

Re: how to pass in params to stored procedure

What about tJDBCInput, can its query be parametrized? tJDBCInput seems can not have inputs, at least not from tRowGenerate.
Also, SQL Builder seems not to support parametrized queries.
Community Manager

Re: how to pass in params to stored procedure

Hello sslavic
What are your expected result?
You can pass parameters to tJDBCInput like this (for example):
tRowGenerate--row1-->tLogRow
|
iterate
|
tJDBCInput("select * from tableName where id="+row1.id)-->tLogRow
Best regards

shong
----------------------------------------------------------
Talend | Data Agility for Modern Business