Hive: LOCATION and WITH DBPROPERTIES command in create table command

0 votes

Hi, could you please explain the use of LOCATION and WITH DBPROPERTIES command in below create table command?

CREATE (DATABASE|SCHEMA) [IF NOT EXISTS] database_name
[COMMENT database_comment]
[LOCATION hdfs_path]
[WITH DBPROPERTIES (property_name=property_value, ...)];
May 22 in Big Data Hadoop by Killy
241 views

1 answer to this question.

0 votes

By default, the Hive database will be created inside the default warehouse directory i.e /user/hive/warehouse. But if we want we can store the database in some other HDFS location as well bt mentioning the same in the location field. The DB properties are nothing but mentioning the details about the database created by the user. Suppose the name of the user, the type of the database and the tables it has, the date on which the database is created etc. This makes the other user easy the recognize the database and use it according to the requirement.

answered May 22 by Firoz

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 in Big Data Hadoop by Omkar
• 68,180 points
3,646 views
0 votes
1 answer

How can create the dynamic partition table with data in Hive?

Hi, We can see some steps to do ...READ MORE

answered Jun 19 in Big Data Hadoop by Gitika
• 25,420 points
134 views
0 votes
1 answer

what is the difference between CREATE TABLE and CREATE EXTERNAL TABLE in Hive?

Hey, Although, we can create two types of ...READ MORE

answered Jun 26 in Big Data Hadoop by Gitika
• 25,420 points
156 views
0 votes
1 answer

How to create smaller table from big table in HIVE?

You could probably best use Hive's built-in sampling ...READ MORE

answered Sep 24, 2018 in Big Data Hadoop by digger
• 26,600 points
236 views
0 votes
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,760 points
3,531 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,760 points
433 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
17,962 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,280 points
1,298 views
–1 vote
1 answer

Create Hive table with bucketing and ORC file format

create table hive_dml (emp_id int, first_name string, last_name ...READ MORE

answered Jan 4 in Big Data Hadoop by Omkar
• 68,180 points
383 views
+2 votes
2 answers

Create HIVE Table with multi character delimiter

FILELDS TERMINATED BY does not support multi-character delimiters. ...READ MORE

answered Oct 3, 2018 in Big Data Hadoop by slayer
• 29,240 points
2,484 views