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.

Can pig load data into HAWQ?

avatar
Master Guru

Can pig load data into HAWQ?

1 ACCEPTED SOLUTION

avatar
Master Mentor
5 REPLIES 5

avatar
Master Mentor

avatar
Master Guru

straight out of the docs:

SET pig.splitCombination false; A = LOAD 'hawq://mdw1:5432/gpadmin' USING com.gopivotal.pig.HawqLoader('retail_demo.products_dim', 'gpadmin'); DESCRIBE A; A: {product_id: int,category_id: int,price: bigdecimal,product_name: chararray} B = LOAD 'hawq://mdw1:5432/gpadmin' USING com.gopivotal.pig.HawqLoader('retail_demo.vinyl_counts', 'gpadmin'); DESCRIBE B; B: {category_id: int,count: int} C = JOIN A BY category_id, B by category_id USING 'replicated'; STORE C INTO '$output';

avatar
Master Guru

With PXF, you can do anything. Not sure PIG + HAWQ is the best combo though

avatar
Master Guru

@Timothy Spann @Artem Ervits I got confirmation Pig CAN NOT load directly into HAWQ. it is not supported.

avatar
Master Mentor

Not supported and not possible is two different things. Docs have a clear example.