Import Table from Hive JDBC Connection
jkonieczny
Registered Posts: 13 ✭✭✭✭
I have set up a connection between Dataiku and Hive using an Apache Hive JDBC driver. When I select the "Import tables to dataset" option at the bottom of the connection, I can select a table and import it as a Dataset. However, when the Dataset gets created, I get the following error:
Failed to read data from table, caused by: HiveSQLException: Error while compiling statement: FAILED: ParseException line 1:14 cannot recognize input near '"default"' '.' '"errortest"' in join source, caused by: HiveSQLException: Error while compiling statement: FAILED: ParseException line 1:14 cannot recognize input near '"default"' '.' '"errortest"' in join source, caused by: RuntimeException: org.apache.hadoop.hive.ql.parse.ParseException:line 1:14 cannot recognize input near '"default"' '.' '"errortest"' in join source
HTTP code: 500, type: com.dataiku.dip.exceptions.DataStoreIOException
What is causing this error? Is there a way that I can configure the connection and/or import job to make sure this works correctly?
Failed to read data from table, caused by: HiveSQLException: Error while compiling statement: FAILED: ParseException line 1:14 cannot recognize input near '"default"' '.' '"errortest"' in join source, caused by: HiveSQLException: Error while compiling statement: FAILED: ParseException line 1:14 cannot recognize input near '"default"' '.' '"errortest"' in join source, caused by: RuntimeException: org.apache.hadoop.hive.ql.parse.ParseException:line 1:14 cannot recognize input near '"default"' '.' '"errortest"' in join source
HTTP code: 500, type: com.dataiku.dip.exceptions.DataStoreIOException
What is causing this error? Is there a way that I can configure the connection and/or import job to make sure this works correctly?
Tagged:
Answers
-
Hi,
Connection with Hive should generally not be done through a JDBC connection but through the native integration of DSS and Hadoop. -
Hive does not accept identifiers (i.e. database names, table names) in double quotes. You will get this error also via any other client, such as beeline or Hue. Try to fix your query.
-
Thanks - although the issue is that I didn't write the query, Dataiku generated it automatically when I selected "Import tables to dataset". Based on Clement's answer, I think the best approach is to scrap the Hive JDBC connection altogether.