Hive / dbvisualizer built-in data fetch query fails due to quotation marks
a
anonymous
started a topic
over 11 years ago
[This topic is migrated from our old forums. The original author name has been removed]
I have set-up Hive with dbvisualizer in Windows7 64-bit. Everything works fine if I run queries manually. However, I noticed there is "Data" tab if I open some Hive table. Opening this tab (for a table named table1) seems to be running automatically below query:
SELECT * FROM "default"."table1"
However this fails to error, namely quotation marks surround schema and table (see full error at end of this message). If I run above query manually excluding the quotation marks around default schema and table1 (as SELECT * FROM default.table1) then it would work. So my question is that is it possible to get a driver option (or a general option) in dbvisualizer which would omit using quotation marks outside schema and table?
I am using DbVisualize Free 9.0.8 and snapshot of Hive JDBC 0.9.0 (filename hive-jdbc-0.9.0-cdh4.1.4-20130404.192932-8.jar). However I know that there is no problem with snapshap JDBC jar - as I have been using it successfully for example from R Statistical program (via its JDBC package). Naturally I omitted quotation marks outside schema and tables when I ran queries from R
Full error message:
An error occurred while executing the database request for:
Hive
1
Hive
0.9.0-cdh4.1.4-SNAPSHOT
Short message:
An error occurred while performing the operation:
Query returned non-zero code: 11, cause: FAILED: Parse Error: line 1:14 cannot recognize input near '"default"' '.' '"table1"' in join source
The command that caused the problem:
SELECT * FROM "default"."table1"
Long Message:
Query returned non-zero code: 11, cause: FAILED: Parse Error: line 1:14 cannot recognize input near '"default"' '.' '"table1"' in join source
Details:
Type: java.sql.SQLException
Error Code: 11
SQL State: 42000
System Information:
Product: DbVisualizer Free 9.0.8
Build: #1940 (2013/07/16 15:16)
Java VM: Java HotSpot(TM) 64-Bit Server VM
Java Version: 1.7.0
Java Vendor: Oracle Corporation
OS Name: Windows 7
OS Arch: amd64
OS Version: 6.1
Edited by: Ismo Horppu on Jul 22, 2013 9:45 AM
1 Comment
Hans Bergsten
said
over 11 years ago
[This reply is migrated from our old forums.]
Re: Hive / dbvisualizer built-in data fetch query fails due to quotation marks
Hi Ismo,
Open the Properties tab for the connection and then select the Delimited Identifiers category. Remove the quote character for both the Begin and End Identifier.
Best Regards,
Hans
anonymous