Create database/tables in Hive using ssh to systemt.datascientistworkbench.com
Good Day,
I ssh systemt.datascientistworkbench.com. Then I start hive using "hive" command. I try to create database/tables in hive but it says I don't have access.
I see many test kind of hive databases which people have created. How can I create database/tables in hive?
Please advise.
Thanks.
-Shakeel
-
Athan commented
Just type the following in the Hive Shell:
hive> create database <your database name>
> location < '/complete path of the folder you want to save your database' > ;use the command "show databases; " to verify that your database has been created.
=) Happy learning fellows!
-
Anonymous commented
Hi Shakeel
I am unable to ssh into systemt.datascientistworkbench.com.
Can you please help/ suggest how I can, it is unable to reach the host. -
l145040 commented
I have found its solution:
By Default hive uses /apps/hive/warehouse for LOCATIONFirst you need to create a directory in HDFS e.g:
/user/yourusername/hive/warehouseNow in order to create database your command must be look like:
hive> Create database yourdatabasename
> Location '/user/yourusername/hive/warehouse'OK
Time taken: 0.025 seconds
So in order to verify submit below:hive> show databases;
Good luck!
-
Guerouali Fayçal commented
try this :
beeline -u jdbc:hive2://iop-bi-master:10000/default -n hadoop -
Kartikeswar Mallik commented
Me too, we need the Admin team to help us out ..
Anyone can you please help...
-
Anonymous commented
Me too :(