Support Questions

Find answers, ask questions, and share your expertise
Announcements
Check out our newest addition to the community, the Cloudera Data Analytics (CDA) group hub.

Beeline equivalent of hive command line potion: --database

Explorer

hive has --database option to select database.

--database <databasename>     Specify the database to use

 What is the beeline equivalent of the same?

1 ACCEPTED SOLUTION

Master Collaborator

@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.

View solution in original post

1 REPLY 1

Master Collaborator

@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.
Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.