Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Threaded View
Pig >> mail # user >> A question of pig default load function


Copy link to this message
-
Re: A question of pig default load function
Default loader is PigStorage which takes '\t' as delimiter. In your
2nd example, you need to explicitly specify comma as a delimiter (load
'foo' using PigStorage(',') as ...)

Sent from my iPhone

On Oct 7, 2012, at 12:00 PM, yonghu <[EMAIL PROTECTED]> wrote:

> Dear all,
>
> When I load the data stored in txt file into two bags, e.g.
> {(1),(2),(1)}    {(1),(3)} using :
> A = LOAD '/home/hans/test/r1.txt' AS
> (b1:bag{t1:tuple(f1:int)},b2:bag{t2:tuple(f2:int)});
> everything works fine.
>
> But if I load the as the format
> {(1),(2),(1)},{(1),(3)} using:
> A = LOAD '/home/hans/test/r1.txt' AS
> (b1:bag{t1:tuple(f1:int)},b2:bag{t2:tuple(f2:int)});
> I only got the first part ({(1),(2),(1)},). I lost the second bag. Can
> anyone tell me why?
>
> regards!
>
> Yong
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB