Created 11-18-2024 02:59 AM
I am trying to run use db_name;show tables and it is failing.
Can you please help me with it
[root@cupid ~]# sudo -u hive beeline -u "jdbc:hive2://charon.devemc.com:2181,cupid.devemc.com:2181,portia.devemc.com:2181/;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2;" --showHeader=false --outputformat=tsv2 --delimiter=';' -e "use default;show tables;"
scan complete in 2ms
Connecting to jdbc:hive2://charon.devemc.com:2181,cupid.devemc.com:2181,portia.commvault.com:2181/;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2;
Connected to: Apache Hive (version 0.14.0.2.2.9.0-3393)
Driver: Hive JDBC (version 0.14.0.2.2.9.0-3393)
Transaction isolation: TRANSACTION_REPEATABLE_READ
Error: Error while compiling statement: FAILED: ParseException line 1:11 missing EOF at ';' near 'default' (state=42000,code=40000)
Created 11-18-2024 05:08 AM
The query seems to be failing during the compilation phase, indicating a possible issue with its syntax.
Error: Error while compiling statement: FAILED: ParseException line 1:11 missing EOF at ';' near 'default' (state=42000,code=40000)
It is important to validate the SQL syntax of the query to identify any potential syntax errors that may be causing the problem.
Another point to consider is ensuring that the column names in the query match with those in the source and target tables, as any mismatch can lead to errors.
Created 11-18-2024 09:26 PM
Hi @ggangadharan ,
the query that i am running is "use <dbname>;show tables;"
Created 11-21-2024 10:14 PM
Ideally below should work.
use default;show tables;
Please check HiveServer2, HMS logs and share the stack-trace. To identify the RootCause.