You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pig.apache.org by Harish Krishnan <ha...@gmail.com> on 2013/03/06 00:51:50 UTC

Custom Store Func for storing data as JsonArray

Hi,

My application requires data to be written to hdfs as JsonArray. I tried
using the JsonStorage but it writes each tuple as a line of JsonObject.
E.x:
{a,b,c}
{a2,b2,c2}
{a3,b3,c3}

I tried to write a custom store func but it writes as a line of JsonArray.
E.x:
[{a,b,c}]
[{a2,b2,c2}]
[{a3,b3,c3}]

However what I want is

[
{a,b,c}
{a2,b2,c2}
{a3,b3,c3}
]

Any suggestion?

Thanks & Regards,
Harish.T.K