Support Questions

Find answers, ask questions, and share your expertise

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.