Created
May 5, 2017 19:24
-
-
Save milindjagre/a373527be7983bc9db40cc6ccda8a501 to your computer and use it in GitHub Desktop.
this pig script is used for loading the data stored in pig relation in to the hive table
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
-- this pig script is used for storing the data in pig relation into a hive table | |
-- loading the data in the input file into a pig relation with the custom schema | |
-- this custom schema is used for constructing the hive table | |
input_data = LOAD '/hdpcd/input/post18/post18.csv' USING PigStorage(',') AS (station_name:chararray, year:int, month:int, dayofmonth:int, precipitation:int, temperature_max:int, temperature_min:int); | |
-- storing the input_data pig relation data into a hive table called sfo_weather using HCatalog | |
STORE input_data INTO 'sfo_weather' USING org.apache.hive.hcatalog.pig.HCatStorer(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment