Last active
March 25, 2017 19:50
-
-
Save milindjagre/a7690321c6888f17ffba3e0794055618 to your computer and use it in GitHub Desktop.
This pig script loads the data from the hive table to the pig relation
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
--execute this file by using -useHCatalog flag | |
--the flag "-useHCatalog" enables Pig to pick jars for HCatalog | |
--HCatalog is used for loading data from Apache Hive to Pig | |
--loading the data in "products" hive table into a Pig Relation | |
hive_data = LOAD 'products' USING org.apache.hive.hcatalog.pig.HCatLoader(); | |
--looking at the structure of the data | |
DESCRIBE hive_data; | |
--dumping the data on the terminal window | |
DUMP hive_data; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment