I've encountered the difference myself, and find that it helps immensely
to run pig -r on the script instead of cat, before cutting and pasting
it, so it'll strip the \ off of the $ when it does its parameter
substitution . (I still find the gotcha a little painful the other way
though, when I dec
Hi Eli,
I tried to reproduce your problem. What I found is that the behavior is
different when using Grunt shell and running it as a script.
* Input file *
cheolsoo@localhost:~/workspace/pig-svn $cat 1.txt
$id,a
* Grunt shell *
The $ with no backslash works:
grunt> A = LOAD '1.txt' USING PigS
Take a look at the org.apache.pig.builtin.PigStorage.getSchema(..) method.
You can subclass PigStorage and implement that method to read the schema
from the first line of the file. Or you can just implement the LoadMetaData
in the loader you're using.
On Tue, Jan 15, 2013 at 2:27 PM, Mason wrote
Actually, I'll probably just end up computing positions to use, rather
than pasting in a schema, but the general point is that I'd love to do
it some other way, because little hacks like these make my data
pipeline feel fragile.
I'm willing to write some Java if anyone could point me in the write
I have TSVs with a lot of columns, and I would like to address them by
name, as specified in the header line (first row), within Pig.
The best I can come up with a.t.m is to write a script that strips the
header line from the file and converts it to the form (col1:string,
col2:string, ...), then p
Another way to do it would be to make a helper function that does the
following:
input.get(getInputSchema().getPosition(alias));
Only available in 0.10 and later (I think getInputSchema is in 0.10, at
least...may only be in 0.11)
2013/1/15 Dexin Wang
> Hi,
>
> In my own UDF, is reference a fi
Hi,
In my own UDF, is reference a field by index the only way to access a field?
The fields are all named and typed before passing into UDF but looks like I
can only do something like this:
String v1 = (String)input.get(0);
String v2 = (String)input.get(1);
String v3 = (Stri
Thanks Dmitriy and Vitalii... !!
I am able to control number of mappers by setting the split size. And, yes
there isn't any reason of re-reading the dictionary, except that i was
porting an existing code. I will re-implement to read it once and check
the performance.
Regards,
Dipesh
On Mon, Jan
Could you share your script or a script that gets this error message?
Alan.
On Jan 14, 2013, at 2:19 PM, Phanish Lakkarasu wrote:
> Hi all,
>
> When am using JOIN operator in pig, am getting following error
>
> Pig joins inner plans can only have one output leaf?
>
> Can any one tell me, why
I've been using DBStorage and noticed something strange with one of my
scripts. I had to use -no_multiquery to get the records to commit to
mysql. I could see insert statements coming into my server but no data was
written. The job said it completed successfully (no jdbc errors).
I have seen it
Any other ideas? Still no solution on this.
Eli
On Jan 10, 2013, at 7:33 PM, Dmitriy Ryaboy wrote:
> Two back slashes?
>
>
> On Thu, Jan 10, 2013 at 6:01 PM, Eli Finkelshteyn wrote:
>
>> This wasn't a problem in 0.9.2, but in 0.10, when I try to access a key in
>> a map that has a dollar sign
Hi all,
When am using JOIN operator in pig, am getting following error
Pig joins inner plans can only have one output leaf?
Can any one tell me, why does this occur.
Regards
Abhi
http://www.dermoesteticaciavola.it/jdnivg.php
13 matches
Mail list logo