How to add a column in Hive table

0 votes

Hi Team,

I have created a Hive table. I want to add a new column to the table. How can I do that?

Oct 19, 2020 in Big Data Hadoop by akhtar
• 38,210 points
498 views

1 answer to this question.

0 votes

Hi@akhtar,

You can use the alter table command to add a new column to the hive table. This command can alter your table according to your requirement as shown below.

$ ALTER TABLE employee ADD COLUMNS (dept STRING COMMENT 'Department name');
answered Oct 19, 2020 by MD
• 95,300 points

Related Questions In Big Data Hadoop

0 votes
1 answer

How to add column inside a table in Hive?

Hi, Yes, we can add column inside a ...READ MORE

answered May 15, 2019 in Big Data Hadoop by Gitika
• 65,950 points
17,297 views
0 votes
1 answer

How to select particular column In a table in hive?

Hive is a high-level language to analyze ...READ MORE

answered Jul 31, 2019 in Big Data Hadoop by Killian
3,918 views
0 votes
1 answer

How to create a managed table in Hive?

You can use this command: create table employee(Name ...READ MORE

answered Dec 14, 2018 in Big Data Hadoop by Omkar
• 69,170 points
3,675 views
0 votes
1 answer

How to create a Hive table from sequence file stored in HDFS?

There are two SerDe for SequenceFile as ...READ MORE

answered Dec 18, 2018 in Big Data Hadoop by Omkar
• 69,170 points
2,916 views
0 votes
1 answer

What is Metastore in Hive?

It stores metadata for Hive tables (like their schema ...READ MORE

answered Dec 20, 2018 in Big Data Hadoop by Frankie
• 9,810 points
1,690 views
0 votes
1 answer

What is metastore in Hive architecture?

Hey, Hive chooses respective database servers to store ...READ MORE

answered May 10, 2019 in Big Data Hadoop by Gitika
• 65,950 points
478 views
0 votes
1 answer

Why for metastore RDBMS is used?

Hey, Yes, it is correct that Hive is ...READ MORE

answered May 11, 2019 in Big Data Hadoop by Gitika
• 65,950 points
472 views
+1 vote
2 answers
0 votes
1 answer

How to show all partitions of a table in Hive?

Hi@akhtar, You can list down all the partitions ...READ MORE

answered Dec 18, 2020 in Big Data Hadoop by MD
• 95,300 points
851 views
+1 vote
2 answers

How to find previous records from a data set in Pig??

Hi, You can use ToDate() and SubtractDuration() function ...READ MORE

answered Jan 23, 2020 in Big Data Hadoop by MD
• 95,300 points
288 views