Hi,

I am trying to concatenate an open brace ( "{" ) to a string and I believe pig 
thinks that I am trying to open a bag or something.

This does work:
A = LOAD 'short' USING PigStorage('\t') AS (a:chararray, b:chararray, 
c:chararray, d:chararray,e:chararray, f:chararray);
B = FOREACH A GENERATE CONCAT("\[",a);

This does not work:
A = LOAD 'short' USING PigStorage('\t') AS (a:chararray, b:chararray, 
c:chararray, d:chararray,e:chararray, f:chararray);
B = FOREACH A GENERATE CONCAT("\{",a);

It also does not work if I replace the second line with
B = FOREACH A GENERATE CONCAT("{",a);
-or-
B = FOREACH A GENERATE CONCAT("\\{",a);

Is there a way to add an open brace to field?

Thanks in advance for your help.

-Will

Reply via email to