Skip to main content
Ane
Gold ⭐️
February 24, 2022
Solved

Beeline equivalent of hive command line potion: --database

hive has --database option to select database.

--database <databasename> Specify the database to use

 What is the beeline equivalent of the same?

araujo
araujoAnswer
Platinum ⭐️⭐️⭐️
February 25, 2022

@Ane ,

 

You can specify the database as part of the JDBC URI you pass to beeline. For example:

beeline -u "jdbc:hive2://<hostname>:10000/<dbname>"

 

HTH,

André

 

-- Was your question answered? Please take some time to click on "Accept as Solution" below this post. If you find a reply useful, say thanks by clicking on the thumbs up button.

1 reply

araujo
Platinum ⭐️⭐️⭐️
araujoAnswer
Platinum ⭐️⭐️⭐️
February 25, 2022

@Ane ,

 

You can specify the database as part of the JDBC URI you pass to beeline. For example:

beeline -u "jdbc:hive2://<hostname>:10000/<dbname>"

 

HTH,

André

 

Translate
-- Was your question answered? Please take some time to click on "Accept as Solution" below this post. If you find a reply useful, say thanks by clicking on the thumbs up button.