Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个来自 UDF 的数据作为包输出:({( http://www.myurl.com 1000 1000)}) 我如何从这个包中生成 3 个不同的字段作为 url、高度、宽度。
使用flatten运算符,
GENERATE flatten ({(http://www.myurl.com 1000 1000)}) as myTuple
将给出这个元组:
(http://www.myurl.com 1000 1000)
要获得 3 个元组,我们需要STRSPLIT:
STRSPLIT(myTuple,' ',3))as(url:chararray,height:chararray,width:chararray)