Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Plain View
Pig >> mail # user >> CONCAT an open brace to a chararray (Pig v. 0.10)


+
Will Ford 2013-04-05, 00:08
+
Prashant Kommireddi 2013-04-05, 00:26
Copy link to this message
-
Re: CONCAT an open brace to a chararray (Pig v. 0.10)
Pressed send too soon. Try this (single quotes)

B = FOREACH A GENERATE CONCAT('{', a);
On Thu, Apr 4, 2013 at 5:26 PM, Prashant Kommireddi <[EMAIL PROTECTED]>wrote:

> Can you try single quotes?
>
>
>
> On Thu, Apr 4, 2013 at 5:08 PM, Will Ford <[EMAIL PROTECTED]>wrote:
>
>> 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
>>
>
>
+
Will Ford 2013-04-05, 00:34
+
Ramakrishna Nalam 2013-04-05, 01:22
+
Russell Jurney 2013-04-05, 01:50
+
Will Ford 2013-04-05, 02:17
+
Will Ford 2013-04-05, 00:28