我正在加载这些数据:
data6 = 'item1' 111 { ('thing1', 222, {('value1'),('value2')}) }
使用此命令
A = load 'data6' as ( item:chararray, d:int, things:bag{(thing:chararray, d1:int, values:bag{(v:chararray)})} );
我正在尝试将这个命令的整个内容展平。
A_flattened = FOREACH A GENERATE item, d, things::thing AS thing; things::d1 AS d1, FLATTEN(things::values) AS value;
但我只是得到这个错误:
Invalid field projection. Projected field [things::thing] does not exist in schema: item:chararray,d:int,things:bag{:tuple(thing:chararray,d1:int,values:bag{:tuple(v:chararray)})}
我尝试命名内部things
元组,但出现类似错误。有人可以在这里帮助我正确的语法吗?