Hi,
I have a file whose contents look like
{(1L),(2L),(3L)}
{(4L),(2L),(1L)}
{(8L),(3L),(4L)}
In short I want a bag with 3 tuples. I do the following to accomplish it
grunt> A = LOAD 'data1' as aa:bytearray;
grunt> FOREACH A GENERATE (bag{tuple(long),tuple(long),tuple(long)})aa;
2009-11-04 09:28:47,054 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR
1000: Error during parsing. Encountered " <IDENTIFIER> "FOREACH "" at line 1,
column 1.
Was expecting one of:
<EOF>
"cat" ...
"cd" ...
"cp" ...
"copyFromLocal" ...
"copyToLocal" ...
"dump" ...
"describe" ...
"aliases" ...
"explain" ...
"help" ...
"kill" ...
"ls" ...
"mv" ...
"mkdir" ...
"pwd" ...
"quit" ...
"register" ...
"rm" ...
"rmf" ...
"set" ...
"illustrate" ...
"run" ...
"exec" ...
"scriptDone" ...
"" ...
<EOL> ...
";" ...
What should be the syntax to cast?
Thanks!