- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Query on Hive Commands / Beeline
- Labels:
-
Apache Hive
Created ‎11-02-2016 12:36 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Further to my earlier question (https://community.hortonworks.com/questions/64438/hive-beeline-e-in-shell-script.html#comment-64493)
Wondering how to use the commands beeline -e and beeline -f in shell scripts (bash shell). When I tried running beeline -e command directly on the bash, it says connection not available. So I presume we need to run beeline -u command or a combination of beeline;!connect commands together. But once we execute either of these commands, we will be in beeline shell rather than bash shell and hence beeline -e command is not needed anymore. So wondering what is the purpose of beeline -e command and how to use it without invoking beeline -u command earlier.
I am sure my understanding is wrong somewhere and hence would request to please correct me.
Created ‎11-04-2016 02:21 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I use -u and -e
here is example
[hive@sunman1 ~]$ beeline -u jdbc:hive2://localhost:10000 -n hive -e 'show tables' Connecting to jdbc:hive2://localhost:10000 Connected to: Apache Hive (version 1.2.1000.2.5.0.0-1245) Driver: Hive JDBC (version 1.2.1000.2.5.0.0-1245) Transaction isolation: TRANSACTION_REPEATABLE_READ +-----------+--+ | tab_name | +-----------+--+ | airline1 | +-----------+--+ 1 row selected (0.215 seconds) Beeline version 1.2.1000.2.5.0.0-1245 by Apache Hive Closing: 0: jdbc:hive2://localhost:10000 [hive@sunman1 ~]$
Created ‎08-24-2018 11:58 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I see you mention hive2 in connection but it says connected to Connected to: Apache Hive (version 1.2...)
How can we connect to Hive-2.1.*
