You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nifi.apache.org by Puspak <pu...@gmail.com> on 2019/06/24 06:06:37 UTC

Evaluate json path with destination as flowfile-attribute returns null for a specified attribute

hi
The content of the flow file is as below .

{  
   "REQUEST":{  
      "SERVICENAME":"WTX_SERV_ECSESC",
      "WSTOKEN":"ZEegEneBot59",
      "ECSESC-INP":{  
         "SVCHEADER":{  
            "STATION":"OGG",
            "OFFICE":"001",
            "AGENT":"255"
         },
         "SVCACTION":"RETRIEVE",
         "PPP-INFO":{  
            "PPP":"68700200220",
            "KEYINFO":{  
               "DBKEY":"113313412401",
               "REVISION":"17"
            },
            "CRA-RATING":"Y"
         }
      }
   }
}

and i have set the value for pppNumber as
$."REQUEST"."ECSESC-INP"."AWB-INFO"."AWB" in the evaluate json path and set
the destination as flow-file-attribute , but i am getting the value for
pppNumber  as null 



--
Sent from: http://apache-nifi-developer-list.39713.n7.nabble.com/

Re: Evaluate json path with destination as flowfile-attribute returns null for a specified attribute

Posted by Puspak <pu...@gmail.com>.
Thanks Dene for the quick response .

I have achieved the same by some other means. 



--
Sent from: http://apache-nifi-developer-list.39713.n7.nabble.com/

Re: Evaluate json path with destination as flowfile-attribute returns null for a specified attribute

Posted by Denes Arvay <de...@apache.org>.
Hi Puspak,

As far as I know, you shouldn't use the quotes (") in the JSON path
expression. Plus, in your example JSON the AWB-INFO.AWB field is not
present.

Best,
Denes

On Mon, Jun 24, 2019 at 1:47 PM Puspak <pu...@gmail.com> wrote:

> hi
> The content of the flow file is as below .
>
> {
>    "REQUEST":{
>       "SERVICENAME":"WTX_SERV_ECSESC",
>       "WSTOKEN":"ZEegEneBot59",
>       "ECSESC-INP":{
>          "SVCHEADER":{
>             "STATION":"OGG",
>             "OFFICE":"001",
>             "AGENT":"255"
>          },
>          "SVCACTION":"RETRIEVE",
>          "PPP-INFO":{
>             "PPP":"68700200220",
>             "KEYINFO":{
>                "DBKEY":"113313412401",
>                "REVISION":"17"
>             },
>             "CRA-RATING":"Y"
>          }
>       }
>    }
> }
>
> and i have set the value for pppNumber as
> $."REQUEST"."ECSESC-INP"."AWB-INFO"."AWB" in the evaluate json path and set
> the destination as flow-file-attribute , but i am getting the value for
> pppNumber  as null
>
>
>
> --
> Sent from: http://apache-nifi-developer-list.39713.n7.nabble.com/
>