Ask Your Question
1

Can I have JDBC Lookup query as a parameter?

asked 2019-01-24 12:36:20 -0500

Ankesh  Mishra gravatar image

I have something like this - select * from table1 where field1= ${record:value('/field')} for the SQL Query section in JDBC Lookup. The idea is to use this as a parameter so that I am able to reuse the pipeline for multiple table as they need to be processed through similar stages. When I place the query as a parameter for the pipeline, I get the following error.

CREATION_005 - Could not resolve implicit EL expression....
 ....javax.servlet.jsp.el.ELException: No function is mapped to the name "record:value"
edit retag flag offensive close merge delete

Comments

What are you defining as your parameter?

metadaddy gravatar imagemetadaddy ( 2019-01-24 12:40:09 -0500 )edit

The complete query - select * from table1 where field1= ${record:value('/field')}

Ankesh  Mishra gravatar imageAnkesh Mishra ( 2019-01-24 12:42:52 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2019-01-24 13:16:19 -0500

metadaddy gravatar image

The expression is only evaluated once, so you cannot have an expression language function nested within the parameter. You can, however, use parameters within the query like this:

select * from ${TABLE} where ${COLUMN} = ${record:value(FIELD)}

You will need to set the values for your three parameters, for example:

  • TABLE - table1
  • COLUMN - field1
  • FIELD - /field
edit flag offensive delete link more

Comments

1

This works Pat. Thank you.

Ankesh  Mishra gravatar imageAnkesh Mishra ( 2019-01-25 02:39:50 -0500 )edit

Hi pat @metadaddy , i have a similar requirement to pull the data from last 1 day. How can I define a parameter with an expression which calculates (today -1 day). Please suggest

srinath_222 gravatar imagesrinath_222 ( 2019-04-09 08:45:24 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2019-01-24 12:35:03 -0500

Seen: 118 times

Last updated: Jan 24