Skip to main content
Announcements
Save $600 on Qlik Connect registration! Sign up by Dec. 6 to get an extra $100 off with code CYBERSAVE: REGISTER

Qlik Talend Big Data: Talend Job query execution failed with [HiveJDBCDriver](500051) ERROR processing query/statement. Error Code: 40000"

No ratings
cancel
Showing results for 
Search instead for 
Did you mean: 
wei_guo
Support
Support

Qlik Talend Big Data: Talend Job query execution failed with [HiveJDBCDriver](500051) ERROR processing query/statement. Error Code: 40000"

Last Update:

Nov 29, 2024 2:35:35 AM

Updated By:

Xiaodi_Shi

Created date:

Nov 29, 2024 2:38:50 AM

Unable to Execute Talend job query after Talend Remote Engine and JAVA version 17 upgrade in PROD.

The Same query was running fine before on Java 11 version but after Java upgrade to 17,  it is unable to run the particular query and same jobs are failing due to below error

The original query inside hive tDBInput component has no grammar issue.

 

Execution failed with code 1 and error Job stopped with errors or unable to run. Exception in component tDBInput_4 (Outbound_File_Creation_Type_1) org.talend.sdk.component.api.exception.ComponentException: (java.sql.SQLException) [Amazon][HiveJDBCDriver](500051) ERROR processing query/statement. Error Code: 40000, SQL state: TStatus(statusCode:ERROR_STATUS, infoMessages:[*org.apache.hive.service.cli.HiveSQLException:Error while compiling statement: FAILED: ParseException line 1:3328 missing EOF at 'JOIN' near ')':17:16, org.apache.hive.service.cli.operation.Operation:toSQLException:Operation.java:335, org.apache.hadoop.hive.ql.reexec.ReExecDriver:compileAndRespond:ReExecDriver.java:126,

 

Resolution

Try the setting "UseNativeQuery=1" in JDBC connection URL property to enable the use of Native query option.

For example:
jdbc:hive2://localhost:10000/foundation;AuthMech=2;UseNativeQuery=1

This parameter specifies whether the driver transforms the queries emitted by applications. 

1: The driver does not transform the queries emitted by applications, so the native query is used. 

0: The driver transforms the queries emitted by applications and converts them into an equivalent form in HiveQL.

If the application is Hive-aware and already emits HiveQL, then enable this option to avoid the extra overhead of query transformation.

 

Cause

As HiveQL is using parameter "UseNativeQuery=0" by default, which means it will transform query inside JDBC before sending to HS2 , and the introduced false optimization query will cause the problem. 

 

Environment

Talend Big Data 

Labels (1)
Contributors
Version history
Last update:
a week ago
Updated by: