0
我正嘗試使用JsonLoader從JSON文件中使用Pig時輸入數據集的模式。在PIG中定義JsonLoader中的模式
數據的格式爲:
{
'cat_a':'some_text',
'cat_b':{(attribute_name):(attribute_value)}
}
我試圖描述的模式爲:
LOAD 'filename' USING JsonLoader('cat_a:chararray, cat_b:(attribute_name:chararray,attribute_value:int)');
我覺得我所描述的模式不正確的cat_b
。
有人可以幫忙嗎? 在此先感謝。
這是否回答你的問題......? –