2

I am writing to enquire about a problem in my process:

I have a Kudu table and when I try to insert by datastage (11.5 or 11.7) a new row where the size is bigger than 500 characters using the Impala JDBC Driver I receive this error:

Fatal Error: The connector failed to execute the statement: INSERT INTO default.tmp_consulta_teste (idconsulta, idcliente, idinstituicao, idunidadeinst, datahoraconsulta, desccpfcnpj, idcentral, idcontrato, idusuario, valorconsulta, descretornoxml, idintegracaosistema, nomeservidor) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?). The reported errors are: [SQLSTATE HY000] java.sql.SQLException: [Cloudera]ImpalaJDBCDriver Error getting the parameter data type: HIVE_PARAMETER_QUERY_DATA_TYPE_ERR_NON_SUPPORT_DATA_TYPE.

**************How can I fix it? I need to load that information. **********

tk421
  • 5,775
  • 6
  • 23
  • 34
  • Did you look at https://community.cloudera.com/t5/Interactive-Short-cycle-SQL/HIVE-PARAMETER-QUERY-DATA-TYPE-ERR-NON-SUPPORT-DATA-TYPE/m-p/48849? – tk421 Mar 01 '19 at 20:08

1 Answers1

0

I had similar problem where the error I received was :

Servlet.service() for servlet [dispatcherServlet] in context with path [] threw 
exception [Request processing failed; nested exception is  
org.springframework.jdbc.UncategorizedSQLException: PreparedStatementCallback; 
uncategorized SQLException for SQL [update service set comments =? where service_name 
="Zzzzz";]; SQL state [HY000]; error code [500352]; [Simba] 
[ImpalaJDBCDriver](500352) Error getting the parameter data type: 
HIVE_PARAMETER_QUERY_DATA_TYPE_ERR_NON_SUPPORT_DATA_TYPE; nested exception is 
java.sql.SQLException: [Simba][ImpalaJDBCDriver](500352) Error getting the parameter 
data type: HIVE_PARAMETER_QUERY_DATA_TYPE_ERR_NON_SUPPORT_DATA_TYPE] with root cause

I referred to the last most answer in the below link: https://community.cloudera.com/t5/Support-Questions/HIVE-PARAMETER-QUERY-DATA-TYPE-ERR-NON-SUPPORT-DATA-TYPE/td-p/48849

I did the following:

1.Ensure the table is a Kudu table.

  1. Instead of jdbcTemplate.query I did jdbcTemplate.batchUpdate in order to use a PreparedStatement , did SetObject in PreparedStatement.

    jdbcTemplate.batchUpdate(UpdateComment, new BatchPreparedStatementSetter(){
    
        @Override
        public int getBatchSize() {
    
            return 1;
        }
    
        @Override
        public void setValues(PreparedStatement ps, int i) throws SQLException {
            ps.setObject(1, comments);
    
        }
    
    });