{"record":{"id":"b16b244acec07891","repo":"pentaho/pentaho-kettle","slug":"unable-to-handle-database-column-name-on-column-index-i-not","errorCode":null,"errorMessage":"Unable to handle database column '\" + name + \"', on column index \" + i + \" : not a handled data type","messagePattern":"Unable to handle database column '\" \\+ name \\+ \"', on column index \" \\+ i \\+ \" : not a handled data type","errorType":"exception","errorClass":"KettleDatabaseException","httpStatus":null,"severity":"error","filePath":"core/src/main/java/org/pentaho/di/core/database/Database.java","lineNumber":2937,"sourceCode":"\n    // Ask all the value meta types if they want to handle the SQL type.\n    // The first to reply something gets the job...\n    //\n    ValueMetaInterface valueMeta = null;\n    for ( ValueMetaInterface valueMetaClass : valueMetaPluginClasses ) {\n      ValueMetaInterface v =\n        valueMetaClass.getValueFromSQLType( databaseMeta, name, rm, i, ignoreLength, lazyConversion );\n      if ( v != null ) {\n        valueMeta = v;\n        break;\n      }\n    }\n\n    if ( valueMeta != null ) {\n      return valueMeta;\n    }\n\n    throw new KettleDatabaseException( \"Unable to handle database column '\"\n      + name + \"', on column index \" + i + \" : not a handled data type\" );\n  }\n\n  public boolean absolute( ResultSet rs, int position ) throws KettleDatabaseException {\n    try {\n      return rs.absolute( position );\n    } catch ( SQLException e ) {\n      throw new KettleDatabaseException( \"Unable to move resultset to position \" + position, e );\n    }\n  }\n\n  public boolean relative( ResultSet rs, int rows ) throws KettleDatabaseException {\n    try {\n      return rs.relative( rows );\n    } catch ( SQLException e ) {\n      throw new KettleDatabaseException( \"Unable to move the resultset forward \" + rows + \" rows\", e );\n    }\n  }","sourceCodeStart":2919,"sourceCodeEnd":2955,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/core/src/main/java/org/pentaho/di/core/database/Database.java#L2919-L2955","documentation":"Thrown by Database.getValueFromSQLType when a result set column's java.sql.Types value maps to no Kettle ValueMetaInterface. The library supports a fixed set of SQL types; vendor-specific or exotic types fall through all handlers and reach the final throw.","triggerScenarios":"A table column uses an unhandled java.sql.Types constant (e.g. structured/ARRAY/REF types, or vendor extension types like Oracle's specific types) and the query metadata is converted via getRowInfo/getValueFromSQLType.","commonSituations":"Selecting exotic columns (BLOB variants, arrays, object/struct columns) in TableInput steps; driver reports an unusual type code after a database upgrade; custom databases whose type mapping is incomplete.","solutions":["Cast or exclude the unhandled column in the SQL query (e.g. CAST(col AS VARCHAR))","Upgrade Kettle/Pentaho to a version with a broader java.sql.Types mapping","Check the chained cause / column name+index and adjust the table schema to a standard type","Extend the database dialect's type mapping via a custom DatabaseMeta plugin"],"exampleFix":"// before\nSELECT id, custom_struct_col FROM mytable\n// after\nSELECT id, CAST(custom_struct_col AS VARCHAR(4000)) AS custom_struct_col FROM mytable","handlingStrategy":"try-catch","validationCode":"ResultSetMetaData md = rs.getMetaData();\nfor (int i = 1; i <= md.getColumnCount(); i++) {\n  int t = md.getColumnType(i); // check for unhandled types like ARRAY, STRUCT, OTHER\n}","typeGuard":"null","tryCatchPattern":"try {\n  meta = db.getRowInfo(rsmd, false, false);\n} catch (KettleDatabaseException e) {\n  if (e.getMessage().contains(\"not a handled data type\")) {\n    // re-run query with CAST for the named column\n  } else { throw e; }\n}","preventionTips":["CAST exotic columns to standard SQL types in queries","Review table schemas for array/struct/object columns","Keep Kettle updated for broader java.sql.Types coverage","Prefer textual/binary equivalents for unsupported types"],"tags":["jdbc","sql-types","data-type"],"backgroundTag":"unsupported-dtype","analyzedSha":"f3058517a153da500bf4551f46d79b91bf8ec552","analyzedAt":"2026-09-13T14:04:16.340Z","contentChangedAt":"2026-09-13T14:04:16.340Z","schemaVersion":2},"datasetVersion":"2026-09-20T23:17:15.980Z"}