pentaho/pentaho-kettle · error · KettleDatabaseException

Unable to get value '' from database resultset, index

Error message

Unable to get value '' from database resultset, index 

What it means

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.

Solutions

  1. Check the chained SQLException for the driver-level reason (type mismatch, bad index)
  2. Align the field's declared Pentaho type with the actual database column type
  3. Use a different read strategy (e.g. getString plus explicit conversion) for problematic columns
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at core/src/main/java/org/pentaho/di/core/row/value/ValueMetaBase.java:5332 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13). Data as JSON: /api/errors/41d7df9e83b0b987. Report an issue: GitHub.

Appendix: source

Thrown at core/src/main/java/org/pentaho/di/core/row/value/ValueMetaBase.java:5332

            data = resultSet.getTimestamp( index + 1 );
            break; // Timestamp extends java.util.Date
          } else if ( databaseInterface instanceof NetezzaDatabaseMeta ) {
            // PDI-10877 workaround for IBM netezza jdbc 'special' implementation
            data = getNetezzaDateValueWorkaround( databaseInterface, resultSet, index + 1 );
            break;
          } else {
            data = resultSet.getDate( index + 1 );
            break;
          }
        default:
          break;
      }
      if ( resultSet.wasNull() ) {
        data = null;
      }
      return data;
    } catch ( SQLException e ) {
      throw new KettleDatabaseException( "Unable to get value '" + toStringMeta() + "' from database resultset, index "
          + index, e );
    }

  }

  private Object getNetezzaDateValueWorkaround( DatabaseInterface databaseInterface, ResultSet resultSet, int index )
    throws SQLException, KettleDatabaseException {
    Object data = null;
    int type = resultSet.getMetaData().getColumnType( index );
    switch ( type ) {
      case Types.TIME: {
        data = resultSet.getTime( index );
        break;
      }
      default: {
        data = resultSet.getDate( index );
      }
    }

View on GitHub (pinned to f3058517a1)