Pig 中似乎有什么错误?
What seems to be error here in Pig?
我正在尝试读取 pig 中的文件。
A = load 'dataviz/TOP500_201511.csv' using PigStorage(',') as (Rank:int , Previous Rank:int,
First Appearance:int, First Rank:int, Name:chararray,Computer:chararray,Site:chararray,
Manufacturer:chararray,Country:chararray,Year:int,Segment:chararray,Total Cores:int,
Accelerator/Co-Processor Cores:int,Rmax:int,Rpeak:int,Nmax:int,Nhalf:int,Power:int,
Mflops/Watt:int,Architecture:chararray,Processor:chararray,Processor Technology:chararray,
Processor Speed (MHz):int,Operating System:chararray,OS Family:chararray,
Accelerator/Co-Processor:int,Cores per Socket::chararray,Processor Generation:chararray,
System Model:chararray,System Family:chararray,Interconnect Family:chararray,
Interconnect:chararray,Region:chararray,Continent:chararray);
但我收到一个奇怪的错误。
2016-02-06 21:19:50,213 [uber-SubtaskRunner] ERROR
org.apache.pig.tools.grunt.Grunt - ERROR 1200: mismatched input 'Rank' expecting RIGHT_PAREN
请帮忙。
我们不能有多词字段名称。而不是按名称的字段:以前的排名(多字)将其设置为 prv_rank 或任何名称,只要它是有效的标识符即可。对于其他字段名称也是如此。
参考 : https://pig.apache.org/docs/r0.11.0/basic.html#Data+Types+and+More
Identifiers Identifiers include the names of relations (aliases),
fields, variables, and so on. In Pig, identifiers start with a letter
and can be followed by any number of letters, digits, or underscores.
Valid identifiers:
A A123 abc_123_BeX_
Invalid identifiers:
A123 abc$ A!B
我正在尝试读取 pig 中的文件。
A = load 'dataviz/TOP500_201511.csv' using PigStorage(',') as (Rank:int , Previous Rank:int,
First Appearance:int, First Rank:int, Name:chararray,Computer:chararray,Site:chararray,
Manufacturer:chararray,Country:chararray,Year:int,Segment:chararray,Total Cores:int,
Accelerator/Co-Processor Cores:int,Rmax:int,Rpeak:int,Nmax:int,Nhalf:int,Power:int,
Mflops/Watt:int,Architecture:chararray,Processor:chararray,Processor Technology:chararray,
Processor Speed (MHz):int,Operating System:chararray,OS Family:chararray,
Accelerator/Co-Processor:int,Cores per Socket::chararray,Processor Generation:chararray,
System Model:chararray,System Family:chararray,Interconnect Family:chararray,
Interconnect:chararray,Region:chararray,Continent:chararray);
但我收到一个奇怪的错误。
2016-02-06 21:19:50,213 [uber-SubtaskRunner] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1200: mismatched input 'Rank' expecting RIGHT_PAREN
请帮忙。
我们不能有多词字段名称。而不是按名称的字段:以前的排名(多字)将其设置为 prv_rank 或任何名称,只要它是有效的标识符即可。对于其他字段名称也是如此。
参考 : https://pig.apache.org/docs/r0.11.0/basic.html#Data+Types+and+More
Identifiers Identifiers include the names of relations (aliases), fields, variables, and so on. In Pig, identifiers start with a letter and can be followed by any number of letters, digits, or underscores.
Valid identifiers:
A A123 abc_123_BeX_
Invalid identifiers:
A123 abc$ A!B