1. UPLOAD THE DATA FILE INTO HDFS
2. CREATE TABLES FOR THE DATA WITH HIVE AND HCATALOGCREATE TABLE mytable(col1 int, col2 string)ROW FORMAT DELIMITEDFIELDS TERMINATED BY ','3. Now load the data file into the table. Use the following command to do so.LOAD DATA INPATH '/path/to/data' OVERWRITE INTO TABLE mytable4. EXPLORE PIG LATIN DATA TRANSFORMATIONThe data is already in HDFS through HCatalog. HCatalog stores schema andlocation information, so we can use the HCatLoader() function within thePig script to read data from HCatalog-managed tables.Please refer below screen shot to use HCatLoader in Hortonworks
HCatLoader in Hortonworks Print
Modified on: Fri, 29 Apr, 2016 at 1:29 AM
Did you find it helpful?Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.