Quantcast
Channel: Apache Timeline
Viewing all articles
Browse latest Browse all 5648

result of jsonloader of pig script with bag is empty

$
0
0
Hi,

I'm using cdh5 quickstart vm and I have a file like this(not full here):

{"user_id": "kim95",
"type": "Book",
"title": "Modern Database Systems: The Object Model, Interoperability, and
Beyond.",
"year": "1995",
"publisher": "ACM Press and Addison-Wesley",
"authors": {},
"source": "DBLP"

{"user_id": "marshallo79",
"type": "Book",
"title": "Inequalities: Theory of Majorization and Its Application.",
"year": "1979",
"publisher": "Academic Press",
"authors": {("Albert W. Marshall"), ("Ingram Olkin")},
"source": "DBLP"

....

and i used this script:

books = load 'data/book-seded.json'
using JsonLoader('t1:tuple(user_id:
chararray,type:chararray,title:chararray,year:chararray,publisher:chararray,source:chararray,authors:bag{T:tuple(author:chararray)})');

STORE books INTO 'book-no-seded.tsv';

the script work , but the generated file is empty, do you have any idea ?

Uh..I forgot to say that I used cat to have all the file in one line(i
don't why, but the piece of file shown here didn't work in hue)

Thanks

Viewing all articles
Browse latest Browse all 5648

Trending Articles