You are not logged in.
Announcement
Unanswered posts
|
Pages: 1

Hi,
I create SQL query with parameters :
"select COUNT(*) from APPLICATIONFRC where APPLICATIONNAME = ? and APPLICATIONVERSION = ?"
How to pass parameters in tJavaDBInput with this query ?
tJavaDBInput do not accept row line, only iterate.
cdt,
Arnaud
Offline
Hello
tFileInputDelimited--row1--tFlowToIterated--iterate--tJavaDBInput---tLogRow
on tJavaDBInput, type in the sql as:
"select COUNT(*) from APPLICATIONFRC where APPLICATIONNAME ="+(String)globalMap.get("row1.columnName1")+" and APPLICATIONVERSION ="+(String)globalMap.get("row1.columnName2")
Best regards
Shong
Offline
Hello
"DB connections>Queries" because query is generic and you dont know the name of flow.
If you use the query from repository, you can change the query type from repository to built-in and edit the query.
Best regards
Shong
Offline

Yeah, I agree, parametrizable queries would be a very welcomed and good feature in Talend, instead of going old-school with java string concatenation and escaping...
ie. a feature to accept queries that can use context or talend var seamlessly would be very good and provide clean syntax, ie.
"select field1, field2 from mytable where field1 = {context.var1} and field2 = {context.var2}"
I think would be easy to implement Talend side given the possibility to use very well known templating opensource engine like Freemarker.
Last edited by emaxt6 (2010-04-10 13:35:29)
Offline
Pages: 1