cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

How to pass json parameters in mapper form postman or snaplogic URL's for Oracle stored procedure

virender
New Contributor

Hello Team,

Description of pipeline:

  • I have created a sample pipeline to execute โ€œOracle stored procedureโ€ which ha 2 input variables and 1 output variable. Procedure is working fine manually and even from snaps.

Flow of pipeline ๐Ÿ™‚

mapper โ†’ oracle stored procedure snap โ†’ email sender.

In mapper I am passing hardcoded values which are passing in Oracle proc and working fine.

Issue -
1- Not sure how to pass json inputs from outside (postman or URL) in pipeline to mapper snap.
2- What should be the input expression in mapper input to get the input variables from json from outside.

Thanks,
Virender.
+91 9873060030

1 ACCEPTED SOLUTION

Have you defined Pipeline Parameters?

If so This is the Correct approach.
If you havent defined parameters. Go to Edit Pipeline and define them with the names you are using.
LAST_NAME and FIRST_NAME

View solution in original post

11 REPLIES 11

virender
New Contributor

Thanks Surrendra for reply.

its showing me below error:

query_string โ€œhttp.socket.timeout=0โ€
path โ€œ/api/1/rest/slsched/prepare/GET/****/projects/*****/EBSDEV_Oracle_Proc/โ€
response_map
error_id null
error_list
0
query_string โ€œโ€
path โ€œ/api/1/rest/pipeline/prepare/48d7a846-d2d7-47ff-b50e-ef8fad6a9ea8โ€
response_map
error_list
0
message โ€œPipeline has 2 unlinked output viewsโ€
http_status โ€œโ€
http_status_code 400
http_status โ€œโ€
http_status_code 500

Note - changed few names just to avoid names.

Thanks.

Yes pipeline should have one un-linked output view,This is default behavior. You can try to use union snap and combine two output views and make it as single output view.if you need both output views from both the snaps.

If you donโ€™t want output view from any one of the snap then simply close the output view of snap which you donโ€™t want.

Actually cant close the output view of oracle stored procedure as its is default from Oracle snap. let me try union one.

error is gone after combining two snaps output by Union snap.

But it is still not taking input variables from outside and showing below message:

[
{
โ€œtoโ€: โ€œvirender_singh_rana@abc.comโ€,
โ€œccโ€: null,
โ€œbccโ€: null,
โ€œfromโ€: null,
โ€œsubjectโ€: null,
โ€œemailTypeโ€: โ€œtext/htmlโ€,
โ€œbodyโ€: โ€œYour Employee is $LAST_NAME, $FIRST_NAMEโ€
}
]

I have given $FIRST_NAME and $LAST_NAME for input variables in mapper snap and it is passing those name as it is to further snaps.

Thanks.

It looks like you havenโ€™t made the property an expression. Note that variables are not automatically substituted in strings. You can make the property an expression by pressing the โ€˜=โ€™ toggle on the left of the property and then changing the value to something like this:

"Your Employee is " + $LAST_NAME + ", " + $FIRST_NAME

Are you passing these values into the triggered task using a POST operation or are you using a query string like was mentioned in another post? If youโ€™re using a query string, the values will be passed in through Pipeline Parameters and youโ€™ll need to reference them with an underscore instead of a dollar sign:

"Your Employee is " + _LAST_NAME + ", " + _FIRST_NAME