pig中load文件时报错

grunt> A=load 'data.txt' as (name: chararray, id: int, age: int); 

2012-09-11 18:06:32,072 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1000: Error during parsing. Encountered " <PATH> "A=load "" at line 3, column 1.

Was expecting one of:

    <EOF> 

    "cat" ...

    "fs" ...

    "sh" ...

    "cd" ...

    "cp" ...

    "copyFromLocal" ...

    "copyToLocal" ...

    "dump" ...

    "describe" ...

    "aliases" ...

    "explain" ...

    "help" ...

    "kill" ...

    "ls" ...

    "mv" ...

    "mkdir" ...

    "pwd" ...

    "quit" ...

    "register" ...

    "rm" ...

    "rmf" ...

    "set" ...

    "illustrate" ...

    "run" ...

    "exec" ...

    "scriptDone" ...

    "" ...

    <EOL> ...

    ";" ...

Details at logfile: /home/hadoop/pig-0.10.0/logs

不能为:grunt> A=load 'data.txt' as (name: chararray, id: int, age: int);

下面两种都可以:(注意,上面的不能运行主要是A后面一定要有空格)

grunt> A =load 'data.txt' as (name: chararray, id: int, age: int);

grunt> A = load 'data.txt' as (name: chararray, id: int, age: int);

本文参与腾讯云自媒体分享计划,欢迎正在阅读的你也加入,一起分享。

发表于

我来说两句

0 条评论
登录 后参与评论

扫码关注云+社区

领取腾讯云代金券