Create a scheme in the hive

How to create multiple schemas in user DB in bushes?

I am trying to create a schema under DB sam_db in a hive. I am using the following code.

use sam_db; create schema sam_db_schema; 

But when I visit the local host to see the file system, I see that instead of creating a schema, db is created inside sam_db called sam_db_schema.

Below is a screenshot representing my case: enter image description here

There are no several database schemas impossible in a hive.

If possible, then how do I create them.

Are the databases and schemas the same for the hive. Because when I do

 show databases; show schemas 

He gives me the same result.

Please help me understand: Thanks in advance

+7
hadoop hive
source share
1 answer

Are the databases and schemas the same for the hive?

Yes. The Language manual clearly states:

 CREATE (DATABASE|SCHEMA) [IF NOT EXISTS] database_name [COMMENT database_comment] [LOCATION hdfs_path] [WITH DBPROPERTIES (property_name=property_value, ...)]; 

Using SCHEMA and DATABASE are interchangeable - they mean the same thing

+9
source share

All Articles