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

Calling Talend Open Studio Users

The first 100 community members completing the Open Studio survey win a $10 gift voucher.

Start the survey

2019 GARNER 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

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

Why Companies Move to the Cloud: 7 Success Stories

Learn how and why companies are moving to the Cloud

Read Now