how to pass in params to stored procedure

Highlighted
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
Highlighted
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
Highlighted
One Star

Re: how to pass in params to stored procedure

Thanks, it was very helpful
Highlighted
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.
Highlighted
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

2019 GARTNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog