Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
kleinmat
Contributor III
Contributor III

[resolved] Reading databases with parameters?

Hi there,
I want to create a simple web service which receives a "contract date" as one of the request parameters.
The service shall then simply read contracts from a contract table where the above mentioned contract date is greater or equal to the ones in the database.
In other words:
select * from contracts where contract_date < "contract date"
How do I do that in talend?
How can I use request parameters of a web service call as filter parameters of a SQL where clause?
Thanks
Matt
Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable

Hi Matt,
After receiving parameter from web service, assign that value to context variable... and then use that context variable in your sql query..
"select * from contracts where contract_date < "+contex.contract date
Try this... Be careful about format and datatype conversion using proper enclosures.. Use print statement to ensure correctness of the query.
vaibhav

View solution in original post

3 Replies
Anonymous
Not applicable

Hi Matt,
After receiving parameter from web service, assign that value to context variable... and then use that context variable in your sql query..
"select * from contracts where contract_date < "+contex.contract date
Try this... Be careful about format and datatype conversion using proper enclosures.. Use print statement to ensure correctness of the query.
vaibhav
kleinmat
Contributor III
Contributor III
Author

Thanks, sanvaibhav, I followed your advice and it works. Even though I think, Talend makes handling this triviality too complex 🙂
Anonymous
Not applicable

Yes, I knew.. Many could not proceed further due to this problem for many days in early stages...
vaibhav