How to load data from flat files into different partitions of Hive table?

0 votes
I want to load data from flat files into different partitions of hive table? How do I do that? Can anyone suggest?
Jun 26, 2019 in Big Data Hadoop by rakesh
77 views

1 answer to this question.

0 votes

Hi,

You can load data from flat files into different partitions of Hive tables using this command below:

LOAD DATA...INTO TABLE...PARTITION...

You can see the below example to have a clear idea:

  • Load from local files
hive> LOAD DATA LOCAL INPATH './files/employees.txt' OVERWRITE INTO TABLE employees PARTITION (ds='2008-08-15');
  • Load from Hadoop files:

hive> LOAD DATA INPATH './examples/files/employees.txt' OVERWRITE INTO TABLE employees PARTITION (ds='2008-08-15');

 

answered Jun 26, 2019 by Gitika
• 25,440 points

Related Questions In Big Data Hadoop

0 votes
1 answer

How to create a parquet table in hive and store data in it from a hive table?

Please use the code attached below for ...READ MORE

answered Jan 28, 2019 in Big Data Hadoop by Omkar
• 68,840 points
4,820 views
0 votes
1 answer

Hive- unable to load data into table

The command you are typing is incorrect. ...READ MORE

answered Jul 24, 2019 in Big Data Hadoop by Firoz
52 views
0 votes
1 answer

What are the different ways to load data from Hadoop to Azure Data Lake?

I would recommend you to go through ...READ MORE

answered Apr 18, 2018 in Big Data Hadoop by coldcode
• 2,050 points
135 views
0 votes
1 answer

How to extract only few lines of data from HDFS?

Here also in case of Hadoop, it is ...READ MORE

answered May 2, 2018 in Big Data Hadoop by nitinrawat895
• 10,840 points
1,864 views
+1 vote
1 answer

Hadoop Mapreduce word count Program

Firstly you need to understand the concept ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 10,840 points
3,863 views
0 votes
1 answer

hadoop.mapred vs hadoop.mapreduce?

org.apache.hadoop.mapred is the Old API  org.apache.hadoop.mapreduce is the ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 10,840 points
528 views
+1 vote
11 answers

hadoop fs -put command?

put syntax: put <localSrc> <dest> copy syntax: copyFr ...READ MORE

answered Dec 7, 2018 in Big Data Hadoop by Aditya
20,437 views
0 votes
1 answer

Hadoop dfs -ls command?

In your case there is no difference ...READ MORE

answered Mar 16, 2018 in Big Data Hadoop by kurt_cobain
• 9,290 points
1,445 views
0 votes
1 answer

How to load data from flat files into Hive?

Hey, You can load data from flat files ...READ MORE

answered Jun 26, 2019 in Big Data Hadoop by Gitika
• 25,440 points
270 views
0 votes
1 answer

How to load data from HDFS into pig relation?

Hey, To load data from HDFS to pig ...READ MORE

answered May 7, 2019 in Big Data Hadoop by Gitika
• 25,440 points
190 views