Last active
December 18, 2018 22:45
-
-
Save dgadiraju/15f22e7a45e70cff8f199cd631cc8d15 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
orders = LOAD '/user/itversity/data/retail_db/orders/part-00000' USING PigStorage(',') | |
AS (order_id: int, order_date: chararray, customer_id: int, order_status: chararray); | |
grouped = GROUP orders BY order_status; | |
ordercount = FOREACH grouped GENERATE group, COUNT_STAR(orders) AS cnt; | |
DUMP ordercount; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment