pentaho/pentaho-kettle · error · KettleFileException

: Unable to de-serialize indexed storage type for data…

Error message

 : Unable to de-serialize indexed storage type for data type 

What it means

When a value meta uses indexed storage (STORAGE_TYPE_INDEXED), readMetaData de-serializes the index array element-by-element according to the value's data type. If the value's type is not one of the serializable indexed types (String, Number, Integer, Date, BigNumber, Boolean, Binary), a KettleFileException is thrown with this message. It means the indexed storage data type is unsupported for stream de-serialization.

Solutions

  1. Change the indexed field's data type to one of the supported indexed types (String, Number, Integer, Date, BigNumber, Boolean, Binary), e.g. store a Timestamp index as Date or String.
  2. Ensure both producer and consumer use the same Pentaho/Kettle version so the supported indexed-type set matches.
  3. Inspect the value meta with toStringMeta() and log getType() to identify which type hits the default branch.
  4. If the stream is corrupt or from an incompatible writer, regenerate/re-export the metadata.

Example fix

// before: indexed storage with an unsupported type
ValueMetaBase vm = new ValueMetaBase("status", ValueMetaInterface.TYPE_TIMESTAMP);
vm.setStorageType(ValueMetaInterface.STORAGE_TYPE_INDEXED);
// after: use a supported type for the index
ValueMetaBase vm = new ValueMetaBase("status", ValueMetaInterface.TYPE_STRING);
vm.setStorageType(ValueMetaInterface.STORAGE_TYPE_INDEXED);
Defensive patterns

Strategy: validation

Validate before calling

int[] ok = { TYPE_STRING, TYPE_NUMBER, TYPE_INTEGER, TYPE_DATE, TYPE_BIGNUMBER, TYPE_BOOLEAN, TYPE_BINARY };
boolean okType = Arrays.stream(ok).anyMatch(t -> t == vm.getType());
if (vm.getStorageType() == STORAGE_TYPE_INDEXED && !okType) {
  throw new KettleException("Indexed storage does not support type " + vm.getTypeDesc());
}

Type guard

boolean isIndexedSerializable(ValueMetaInterface vm) {
  return vm.getStorageType() == ValueMetaInterface.STORAGE_TYPE_INDEXED
      && (vm.getType() == ValueMetaInterface.TYPE_STRING
       || vm.getType() == ValueMetaInterface.TYPE_NUMBER
       || vm.getType() == ValueMetaInterface.TYPE_INTEGER
       || vm.getType() == ValueMetaInterface.TYPE_DATE
       || vm.getType() == ValueMetaInterface.TYPE_BIGNUMBER
       || vm.getType() == ValueMetaInterface.TYPE_BOOLEAN
       || vm.getType() == ValueMetaInterface.TYPE_BINARY);
}

Try / catch

try {
  valueMeta.readMetaData(dataInputStream);
} catch (KettleFileException e) {
  if (e.getMessage() != null && e.getMessage().contains("de-serialize indexed storage type")) {
    logError("Unsupported indexed type: " + valueMeta.toStringMeta());
  }
  throw e;
}

Prevention

When it happens

Trigger: Reading value metadata from an InputStream where a field has storageType=INDEXED and a data type not handled by the switch in readMetaData (e.g. TYPE_TIMESTAMP, TYPE_INET, TYPE_JSON, TYPE_AVRO). Also produced by corrupt/foreign stream data that yields an unrecognized getType().

Common situations: Row metadata containing an indexed value of a newer type (Timestamp/Inet) serialized by a newer Pentaho version and read by an older one; hand-built ValueMetaInteger-based indexed fields via setIndexedConversionTypes misuse; corrupted metadata streams.

Related errors


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

Appendix: source

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

                  index[i] = readNumber( inputStream );
                  break;
                case TYPE_INTEGER:
                  index[i] = readInteger( inputStream );
                  break;
                case TYPE_DATE:
                  index[i] = readDate( inputStream );
                  break;
                case TYPE_BIGNUMBER:
                  index[i] = readBigNumber( inputStream );
                  break;
                case TYPE_BOOLEAN:
                  index[i] = readBoolean( inputStream );
                  break;
                case TYPE_BINARY:
                  index[i] = readBinary( inputStream );
                  break;
                default:
                  throw new KettleFileException( toString()
                      + " : Unable to de-serialize indexed storage type for data type " + getType() );
              }
            }
          }
          break;

        case STORAGE_TYPE_BINARY_STRING:
          // In case we do have storage metadata defined, we read that back in as
          // well..
          if ( inputStream.readBoolean() ) {
            storageMetadata = new ValueMetaBase( inputStream );
          }
          break;

        default:
          break;
      }

View on GitHub (pinned to f3058517a1)