cancel
Showing results for 
Search instead for 
Did you mean: 

How to pass mapper column in Rest API filter condition

pranil2k2
Contributor

Hi,

I have a requiremnet, where i need to pass the mapper Date column (which i read from oracle table) in REST API filter condition. i tried with below syntax, but it is giving error. please someone can advice here.

Created gt datetime’" + $CREATED + "’

if i hardoce the date value it is working — Created gt datetime’2020-04-02T11:00:00’

image

8 REPLIES 8

pranil2k2
Contributor

Hi ,

I tried as you said, but it is giving same error as bad request.

My Pipeline is very simple. i am trying to read date column from Oracle table, passing it through mapper, and then using it in Rest Get filter.

image

image

image

image
image
image

Not sure what your rest endpoint is expecting, but to mimic the same value when hard coding the date you may need the single quotes like this:

“Created gt datetime ‘“ + $CREATED + “‘“

Where you are surrounding the value in $CREATED with single quotes similar to your hard coded string/date example

pranil2k2
Contributor

Hi Howard,

Thanks for the help and input.
It worked when I use the Oracle Select Snap, instead of Oracle Execute.

image

I am very great ful for your help.

No problem. Glad it is working.

Just an FYI, disabling the first snap In a branch of snaps will disable all downstream snaps as well. So, for that branch in your screenshot of all disabled snaps, you can just disable the first one and have the same effect. Just to save you time from disabling and enabling all of them.