{"record":{"id":"41d7df9e83b0b987","repo":"pentaho/pentaho-kettle","slug":"unable-to-get-value-from-database-resultset-index","errorCode":null,"errorMessage":"Unable to get value '' from database resultset, index ","messagePattern":"Unable to get value '' from database resultset, index ","errorType":"exception","errorClass":"KettleDatabaseException","httpStatus":null,"severity":"error","filePath":"core/src/main/java/org/pentaho/di/core/row/value/ValueMetaBase.java","lineNumber":5332,"sourceCode":"            data = resultSet.getTimestamp( index + 1 );\n            break; // Timestamp extends java.util.Date\n          } else if ( databaseInterface instanceof NetezzaDatabaseMeta ) {\n            // PDI-10877 workaround for IBM netezza jdbc 'special' implementation\n            data = getNetezzaDateValueWorkaround( databaseInterface, resultSet, index + 1 );\n            break;\n          } else {\n            data = resultSet.getDate( index + 1 );\n            break;\n          }\n        default:\n          break;\n      }\n      if ( resultSet.wasNull() ) {\n        data = null;\n      }\n      return data;\n    } catch ( SQLException e ) {\n      throw new KettleDatabaseException( \"Unable to get value '\" + toStringMeta() + \"' from database resultset, index \"\n          + index, e );\n    }\n\n  }\n\n  private Object getNetezzaDateValueWorkaround( DatabaseInterface databaseInterface, ResultSet resultSet, int index )\n    throws SQLException, KettleDatabaseException {\n    Object data = null;\n    int type = resultSet.getMetaData().getColumnType( index );\n    switch ( type ) {\n      case Types.TIME: {\n        data = resultSet.getTime( index );\n        break;\n      }\n      default: {\n        data = resultSet.getDate( index );\n      }\n    }","sourceCodeStart":5314,"sourceCodeEnd":5350,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/core/src/main/java/org/pentaho/di/core/row/value/ValueMetaBase.java#L5314-L5350","documentation":"Wrapper error from ValueMetaBase.getValueFromResultSet(): the type-specific resultSet.getXxx() read ( getDate, getTimestamp, Netezza workaround, etc.) threw a SQLException for the given column index. The value name and index are included; the original exception is chained as the cause.","triggerScenarios":"Thrown at core/src/main/java/org/pentaho/di/core/row/value/ValueMetaBase.java:5332 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the chained SQLException for the driver-level reason (type mismatch, bad index)","Align the field's declared Pentaho type with the actual database column type","Use a different read strategy (e.g. getString plus explicit conversion) for problematic columns"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}