I was trying to enter the schema of a dataset while using Pig from a JSON file using the JsonLoader.
The format of the data is as:
{
'cat_a':'some_text',
'cat_b':{(attribute_name):(attribute_value)}
}
I am trying to describe the schema as:
LOAD 'filename' USING JsonLoader('cat_a:chararray, cat_b:(attribute_name:chararray,attribute_value:int)');
I feel that I'm describing the schema incorrectly for cat_b.
Can someone help out in that? Thanks in advance.