nifi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Turcsanyi <turcsa...@cloudera.com.INVALID>
Subject Re: convert json to csv on nifi
Date Mon, 26 Aug 2019 05:53:42 GMT
Hi Anushke,

What is the json path you would like to evaluate?

The only array (that could be the target of SplitJson) is inside "details".
"details" is of type string which contains escaped json content so it won't
be parsed. Is the escaping intentional?

Kind regards,
Peter

On Sun, Aug 25, 2019 at 9:44 PM Anushka Hewawitharana <hewa.anu@gmail.com>
wrote:

> Dear Team,
>
> I have listen json kafka feed and put to flat files using nifi
> Now i need to convert them to csv using nifi.
>
>
>
> But i have error on "json path"  attribute on splitjson processor.
> My sample json as below.
>
>    {
>       "section":"prepaid_myplan",
>       "action":"change_mypaln",
>       "sender":null,
>       "recipient":null,
>
> "details":"{\"channel\":\"SCAPP\",\"planId\":\"1\",\"serviceAmounts\":[{\"serviceId\":\"5\",\"usageAmount\":\"0\"},{\"serviceId\":\"4\",\"usageAmount\":\"0\"},{\"serviceId\":\"1\",\"usageAmount\":\"0\"},{\"serviceId\":\"2\",\"usageAmount\":\"50\"}],\"totalValue\":\"137700\"}",
>       "amount":null,
>       "account_no":null,
>       "datetime":"2011-08-20 11:18:38",
>       "msisdn":"555555555",
>       "imei":"null",
>       "nic":"155555504555",
>       "lob":"MOBILE",
>       "deviceOs":"android",
>       "appVersion":"9.0.0",
>       "deviceModelId":"MSM55574",
>       "connType":"PREPAID",
>       "language":"en",
>       "device_id":null,
>       "status":"SUCCESS"
>    }
>
> kindly advise me on json path for above
>
>
>
> Regards
> Anushke
>
>
>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message