How can I create multiple schema under a user defined DB in hive?
I am trying to create a schema under a DB sam_db in hive. I am using the folowing code.
use sam_db;
create schema sam_db_schema;
But when I visit the local host to see the filesystem I see that instead of a schema being created inside sam_db a db named sam_db_schema is getting created.
Below is the screen shot presenting my case:
Isn't multiple schemas for a DB not possible in hive.
If possible then how do I create them.
Are both database and schema same for hive. Because when I do a
show databases;
show schemas
It gives me the same output.
Please help me understand : Thanks in advance
Are both database and schema same for hive?
Yes. The Language manual states this clearly:
CREATE (DATABASE|SCHEMA) [IF NOT EXISTS] database_name [COMMENT database_comment] [LOCATION hdfs_path] [WITH DBPROPERTIES (property_name=property_value, ...)];
The uses of SCHEMA and DATABASE are interchangeable – they mean the same thing
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With