Pig Load with Schema giving error

bigdata
#1

I have a file called data_tuple_bag.txt on hdfs with the following content:
10,{(1,2),(2,3)}
11,{(4,5),(6,7)}

I am creating a relation as below :
D = LOAD ‘/user/pig_demo/data_tuple_bag.txt’ AS (f1:int,B:{T:(t1:int,t2:int)});
When I DUMP it it is giving me ACCESSING_NON_EXISTENT_FIELD 2 time(s) as well as FIELD_DISCARDED_TYPE_CONVERSION_FAILED 2 time(s) and an empty output.

I changed the relation to :
D = LOAD ‘/user/pig_demo/data_tuple_bag.txt’ USING PigStorage(’,’) AS (f1:int,B:{T:(t1:int,t2:int)});
Now it’s only giving FIELD_DISCARDED_TYPE_CONVERSION_FAILED 2 time(s) and output as :

(10,)
(11,)

Can anybody tell me what wrong am I doing here?

Thanks in Advance.

0 Likes