Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]

Archives of Support Questions (Read Only)

This is an archived board for historical reference. Information and links may no longer be available or relevant
Announcements
This board is archived and read-only for historical reference. To ask a new question, please post a new topic on the appropriate active board.

Text file to Parquet file conversion using Pig

avatar
Rising Star

Hi ,

Please help on the text file to parquet file conversion using pig.

Got this syntax.

store A into '/test-warehouse/tinytable' USING parquet.pig.ParquetStorer;

using this am getting error.

whether text file has to be loaded first into alias A. and then run the above store command.

"/test-warehouse/tinytable" - this path is parquet file put path ?

1 ACCEPTED SOLUTION

avatar
Master Mentor

@prakash pal I am assuming that you are using CDH or following this

A --> You are loading text file using parquet.pig.ParquetLoader

now, storing A as paruqet using parquet.pig.ParquetStorer

Answer: You will load text file=A

and then store A as parquet

View solution in original post

4 REPLIES 4

avatar
Master Mentor

@prakash pal I am assuming that you are using CDH or following this

A --> You are loading text file using parquet.pig.ParquetLoader

now, storing A as paruqet using parquet.pig.ParquetStorer

Answer: You will load text file=A

and then store A as parquet

avatar
Master Mentor

avatar
Rising Star

Thanks Neeraj for reply. It worked after syntactical changes. I loaded using PigStorage and stored using parquet.pig.ParquetStorer. Hope this is correct.

And original file is created as /user/folder/pig_file_par/part-m-00000.parquet.

avatar
Master Mentor

@prakash pal Perfect! Please close the thread by accepting the answer.