March 2017

Requirement Suppose you are having an XML formatted data file. This file contains some empty tag. The requirement is to parse XML data in Hive and assign any default value to the empty tags. Components Involved Hive Maven Java Solution There are many solutions for parsing XML data into hiveRead More →

Requirement Suppose, you have one table in hive with one column and you want to split this column into multiple columns and then store the results into another Hive table. Solution Assume the name of hive table is “transact_tbl” and it has one column named as “connections”, and values in connectionsRead More →

Requirement Assume that you want to load CSV file in pig and store the output delimited by a pipe (‘|’). Solution Please follow the below steps:- Step 1: Sample CSV file Create a sample CSV file named as sample_1.csv. If you have any sample data with you, then put theRead More →

Requirement If you have comma separated file and you want to create a table in the hive on top of it (need to load CSV file in hive), then follow the below steps. Solution Step 1: Sample CSV File Create a sample CSV file named as sample_1.csv. You can downloadRead More →

Requirement You have one CSV file which is present at Hdfs location, and you want to create a hive layer on top of this data, but CSV file is having two headers on top of it, and you don’t want them to come into your hive table, so let’s solveRead More →