-1

I want to know how my data should be text file in relative to following script? How pig differentiate delimiter for following script? Please give me sample one row of input?

A = LOAD 'mydata.txt' AS (P:int, T1:tuple(f1:int, f2:int), B:{T2:(t1:int,t2:int)}, M:[] );

hiropon
  • 1,675
  • 2
  • 18
  • 41

1 Answers1

0

At first, there is a document:

And, see this:

Sample data:

30|(1,2)|{(3,4)}|[]

Sample code:

A = LOAD 'mydata.txt' USING PigStorage('|') AS (P:int, T1:tuple(f1:int, f2:int), B:{T2:(t1:int,t2:int)}, M:[] );
DUMP A;

It seems PigStorage cannot determine commas in bag. I guess it's bug.

hiropon
  • 1,675
  • 2
  • 18
  • 41