1
votes

I tried to load data from this file named data

(1,[open#apache])
(2,[apache#hadoop])

with this pig script

A = LOAD 'data' USING PigStorage(' ') as (col1:int, M:map []);

but i got

(,)
(,)

please help me. Many thanks.

1

1 Answers

0
votes

you can fix your code like this :

A = LOAD 'data' USING PigStorage(' ') as (a:tuple(col1:int, M:map []));
DUMP A;

would give you

((1,[open#apache]))
((2,[apache#hadoop]))