Forum Discussion

virender's avatar
virender
New Contributor
7 years ago
Solved

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

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

  • 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

11 Replies

    • dmiller's avatar
      dmiller
      Former Employee

      We might need a bit more information on what you want to pass in and from where.
      For example, to get information from a URL may require a REST Get before the Mapper.

      • virender's avatar
        virender
        New Contributor

        Through REST Post I am passing below using postman tool:

        {
        “FIRST_NAME”:“Virender”,
        “LAST_NAME”:“Rana”
        }

        Postman setting:
        Key Value


        Accept application/json
        Authorization Bearer xxxxxxxxxxxxxxxxxxxxxx
        content-type application/json.

        In mapper input variables I have given two parameters as below:
        $FIRST_NAME
        $LAST_NAME

        Feel free to ask more information if any.

        Thanks,

  • virender's avatar
    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.

    • Surendar's avatar
      Surendar
      Contributor

      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.

      • virender's avatar
        virender
        New Contributor

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