【发布时间】:2015-05-01 14:24:16
【问题描述】:
给定一个 csv 文件的第一行可以作为标题,如何使用这些标题在 Pig 中动态加载字段名称?即
id,year,total
1,1999,190
2,1998,20
a = LOAD '/path/to/file.csv' USING PigStorage() AS --use first row as field names
> describe a;
> id:bytearray,year:bytearray,total:bytearray
【问题讨论】:
标签: hadoop apache-pig