Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Impala jdbc - Kudu table

Impala jdbc - Kudu table

New Contributor

Hi,

I have created Kudu table with the follwing script  :
CREATE TABLE BOOLCHECK
(
ACCOUNT_ID STRING PRIMARY KEY,
INDICATOR BOOLEAN
)
PARTITION BY HASH PARTITIONS 4
STORED AS KUDU;

 

When tried to load data to the table using jdbc connector(2.6.9 version) using prepare statment I got following error :

Caused by: com.cloudera.impala.support.exceptions.GeneralException: [Cloudera][ImpalaJDBCDriver](500352) Error getting the parameter data type: HIVE_PARAMETER_QUERY_DATA_TYPE_ERR_NON_SUPPORT_DATA_TYPE
... 19 more
Caused by: com.cloudera.impala.support.exceptions.GeneralException: HIVE_PARAMETER_QUERY_DATA_TYPE_ERR_NON_SUPPORT_DATA_TYPE
... 19 more

 

code: 
DriverManagerDataSource driverManagerDataSource = new SingleConnectionDataSource();
driverManagerDataSource.setDriverClassName("com.cloudera.impala.jdbc4.Driver");
driverManagerDataSource.setUrl("jdbc:impala://url:21050;");
driverManagerDataSource.setUsername("pass");
driverManagerDataSource.setPassword("pass");
driverManagerDataSource.getConnection();
PreparedStatement pr = driverManagerDataSource.getConnection().prepareStatement( "INSERT INTO BOOLCHECK (ACCOUNT_ID, BENI) VALUES (?,?)" );
pr.setObject( 1, "OMER" );
pr.setObject( 2,false );


pr.execute();

 

 

 

3 REPLIES 3

Re: Impala jdbc - Kudu table

Master Collaborator
And does your code work against the Impala HDFS backed table? (Btw you have a type in the snipper table has a column INDICATOR and the query has a column BENI)

Re: Impala jdbc - Kudu table

Contributor

Same question about if this issue is only happening for Kudu tables? I saw same error was solved by the workaround (use setObject instead of setString) here. Though it seems you are not using setString.

Highlighted

Re: Impala jdbc - Kudu table

New Contributor

Hi,

the issue occured also for pqreqt table, I think this is a bug with the jdbc conenctor.

Using .setBoolean fix the issue...