user2631600
user2631600

Reputation: 759

Apache Pig , programe run issues

i am new to Pig programming,

I just tried to load the data using 'load; statement as

A = LOAD 'sample' Using PigStorage(':') as (name:charrarray,word:chararray);

My input-sample will look like below

ram:how are you
sam:ya i am fine

but output look as follows

ram,how are you
sam,ya i am fine 

not delimited by : can you please tell why?

Upvotes: 0

Views: 53

Answers (1)

Sivasakthi Jayaraman
Sivasakthi Jayaraman

Reputation: 4724

If you used DUMP command to the print the output yes that's the expected behavior in pig. DUMP command will always print the output with ',' as delimiter by default.

If you want to print your output with ':' as delimiter, use like this

STORE A INTO '<output folder>' USING PigStorage('<delimiter>');

STORE A INTO 'myoutput' USING PigStorage(':');

Inside myoutput folder check the file name starts with part*

Upvotes: 1

Related Questions