Questions tagged [beeline]

Beeline is a Hive command-line shell that works with HiveServer2

Beeline replaces Hive CLI for Hiveserver. Documentation is available here.

The Beeline shell works in both embedded mode as well as remote mode. In the embedded mode, it runs an embedded Hive (similar to Hive CLI) whereas remote mode is for connecting to a separate HiveServer2 process over Thrift. Starting in Hive 0.14, when Beeline is used with HiveServer2, it also prints the log messages from HiveServer2 for queries it executes to STDERR. Remote HiveServer2 mode is recommended for production use, as it is more secure and doesn't require direct HDFS/metastore access to be granted for users.

There’s detailed documentation of SQLLine which is applicable to Beeline as well.

281 questions
2
votes
1 answer

How to stop a Hive query without exiting Beeline CLI?

If I accidently start a long query, how can I stop it without exiting Beeline interface? When I use CTRL + Z and CTRL + C both stop the query but exit Beeline. Also, if I am typing a query and accidently make an typing error, is there a shortcut to…
st789
  • 41
  • 8
2
votes
0 answers

Hiveserver2 started but 10000 port not coming up

I am able to start hiveserver2 service on Centos8.5 and attached below logs when starting hiveserver2. hiveserver2 logs Also hive metastore service is up and running. Logs are attached below. hive metastore logs I am able to access hive shell by…
Faizan
  • 21
  • 5
2
votes
0 answers

Could not open client transport with JDBC Uri: jdbc:hive2://localhost:10000/default: java.net.ConnectException: Connection refused (state=08S01,code=0

hadoop 3.3.1 Hive 2.3.9 I use embedded database. hive-site.xml: javax.jdo.option.ConnectionURL jdbc:derby:;databaseName=metastore_db;create=true JDBC connect string for a JDBC…
Venus
  • 1,184
  • 2
  • 13
  • 32
2
votes
1 answer

How to insert array> into hive table?

I have a hive table as follows: 0: jdbc:hive2://Desktop:10000> desc tb_test2; +-------------+-------------------------+----------+ | col_name | data_type | comment | +-------------+-------------------------+----------+ | name …
needhelp
  • 37
  • 7
2
votes
1 answer

Hive ALTER command to drop partition having values older than 24 months

I have a hive table(consumer_data) with partition column 'val_dt' which is a string column having values in the date format 'yyyy-MM'. I have multiple partitions in the table, from '2015-01' to '2020-04'. Each month the data is added incrementally…
Ajay
  • 23
  • 3
2
votes
1 answer

how to remove table names from column names in beeline query results

I am saving beeline query output to a csv file. However the column names in the csv files contain the table name too. For example if table name is sales and col name is Date then csv has sales.Date as the column name. I googled around and found a…
itthrill
  • 1,241
  • 2
  • 17
  • 36
2
votes
0 answers

Hive is not connecting with localhost:10000

I am trying to connect with hive localhost:10000 using the beeline with URL !connect jdbc:hive2://localhost: 10000. Both the client and the server running on the same machine. When I trying to run netstat -an | grep 10000 it gives nothing means the…
ksanjay
  • 75
  • 9
2
votes
1 answer

How to setup beeline to use variable in connection string

Currently in our dev environment we have hardcoded the beeline connect string to something like beeline -u…
user3646699
  • 149
  • 4
  • 17
2
votes
3 answers

Hive: How do I compare two columns in WHERE clause having complex datatypes?

I have a hive table that acts as my source table. I also have one more hive table that acts as target. The DDL of both the source table and target table is same, except that a few journaling columns have been added in the target table. Below are the…
aiman
  • 1,049
  • 19
  • 57
2
votes
1 answer

drop table command is not deleting path of hive table which was created by spark-sql

I am trying to drop a table(Internal) table that was created Spark-Sql, some how table is getting dropped but location of the table is still exists. Can some one let me know how to do this? I tried both Beeline and Spark-Sql create table…
sande
  • 567
  • 1
  • 10
  • 24
2
votes
1 answer

What is path for hive beeline command history file?

Using beeline to connect hive and running multiple commands.I am not able to find the path where I can view the history of all executed hive commands.
Harsimranjit Singh Kler
  • 2,006
  • 1
  • 18
  • 21
2
votes
2 answers

Hive query failed on Tez DAG did not succeed due to VERTEX_FAILURE

I have a basic setup of Ambari 2.5.3 and HDP 2.6.3 and tried to run some simple queries below. I don't understand why it failed. Can you help? [root@demo demo]# beeline Beeline version 1.2.1000.2.6.3.0-235 by Apache Hive beeline> !connect…
HP.
  • 19,226
  • 53
  • 154
  • 253
2
votes
1 answer

Is there a way to stop beeline from generating CR character?

When I redirect the output of beeline to a file, I can see that the file generated has ^M (CR, carriage return, 0x0D hex) character inside which is placed at around column 144, presumably as a way to wrap around text output. Is there a way to turn…
paolov
  • 2,139
  • 1
  • 34
  • 43
2
votes
1 answer

Beeline usage instead of hive in shell script

In my shell script I am using this query to get the last_value of the column id. last_val=`beeline -e "select nvl(max(id),0) from testing.1_test"` The result is +----------+--+ | _c0 | +----------+--+ | 3380901 | +----------+--+ Now I want…
user7590556
2
votes
1 answer

Hive support for subquery in Join condition?

Error: Error while compiling statement: FAILED: SemanticException in encountered with 0 children (state=42000,code=40000) Do I need to find a solution to getting the subquery out of the on condition? select -- a bunch of stuff min,max,sum and case…
AM_Hawk
  • 661
  • 1
  • 15
  • 33
1 2
3
18 19