pentaho/pentaho-kettle · error · KettleValueException
: I don't know how to convert binary values to BigDecimals.
Error message
: I don't know how to convert binary values to BigDecimals.
What it means
ValueMetaBase.getBigNumber() converts a stored value to BigDecimal but has no conversion path for TYPE_BINARY (byte[]) values. The library refuses to guess a binary-to-numeric interpretation, so it throws KettleValueException with this message, prefixed by the field's toString(). It signals an incorrectly typed field in the row metadata rather than a data-value problem.
Solutions
- Fix the field's metadata type to TYPE_NUMBER/TYPE_BIGNUMBER (or Integer) so a numeric conversion exists
- Decode the bytes yourself (e.g. new String(bytes) then new BigDecimal(s)) before requesting a BigNumber
- Reject/repair the upstream step that produces binary data where a number is expected
Example fix
// before
ValueMetaInterface meta = new ValueMetaBase("amount", ValueMetaInterface.TYPE_BINARY);
BigDecimal v = meta.getBigNumber(data); // throws
// after
ValueMetaInterface meta = new ValueMetaBase("amount", ValueMetaInterface.TYPE_BIGNUMBER);
meta.setConversionMask("#,##0.00");
BigDecimal v = meta.getBigNumber(meta.convertDataCompatibility(...)); // proper numeric metadata Defensive patterns
Strategy: validation
Validate before calling
if (meta == null || meta.getType() == ValueMetaInterface.TYPE_BINARY) {
throw new IllegalArgumentException("Field '" + (meta != null ? meta.getName() : "?") + "' is BINARY; cannot read as BigNumber");
}
BigDecimal v = meta.getBigNumber(value); Type guard
boolean isNumericReadable(ValueMetaInterface m) {
int t = m.getType();
return t == ValueMetaInterface.TYPE_BIGNUMBER || t == ValueMetaInterface.TYPE_NUMBER
|| t == ValueMetaInterface.TYPE_INTEGER || t == ValueMetaInterface.TYPE_STRING;
} Try / catch
try {
BigDecimal v = meta.getBigNumber(value);
} catch (KettleValueException e) {
log.warn("Cannot convert field " + meta.getName() + " to BigDecimal: " + e.getMessage());
// fallback: decode bytes or skip row
} Prevention
- Set correct field types at the producing step, never assume downstream coercion
- Check getValueMeta(i).getType() before numeric accessors
- For byte[] payloads, decode to String/number explicitly first
When it happens
Trigger: Calling getBigNumber(object) (directly or via row.getNumber()/RowMeta.getBigNumber) on a ValueMeta whose type is TYPE_BINARY, regardless of storage type.
Common situations: A step or UDF sets a field as binary (e.g. raw bytes from a file or network payload) while downstream code treats it as numeric; metadata built with ValueMetaFactory or new ValueMetaBase(name, ValueMetaInterface.TYPE_BINARY) then read as a number; CSV/binary input steps that classify a column as Binary instead of Number.
Understand the failure class
Background: "is not a compatible type" / "cannot merge" errors: when a value's type doesn't match what the library requires — this error's family across 65 libraries.
Related errors
- : I don't know how to convert serializable values to…
- Error converting data while looking up value
- : I don't know how to convert a binary value to Internet…
- : I don't know how to convert a binary value to timestamp.
- : I don't know how to convert a boolean to a Internet…
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/c551537b078beed0.
Report an issue: GitHub.
Appendix: source
Thrown at core/src/main/java/org/pentaho/di/core/row/value/ValueMetaBase.java:2215
return convertDateToBigNumber( (Date) convertBinaryStringToNativeType( (byte[]) object ) );
case STORAGE_TYPE_INDEXED:
return convertDateToBigNumber( (Date) index[( (Integer) object ).intValue()] );
default:
throw new KettleValueException( toString() + " : Unknown storage type " + storageType + " specified." );
}
case TYPE_BOOLEAN:
switch ( storageType ) {
case STORAGE_TYPE_NORMAL:
return convertBooleanToBigNumber( (Boolean) object );
case STORAGE_TYPE_BINARY_STRING:
return convertBooleanToBigNumber( (Boolean) convertBinaryStringToNativeType( (byte[]) object ) );
case STORAGE_TYPE_INDEXED:
return convertBooleanToBigNumber( (Boolean) index[( (Integer) object ).intValue()] );
default:
throw new KettleValueException( toString() + " : Unknown storage type " + storageType + " specified." );
}
case TYPE_BINARY:
throw new KettleValueException( toString() + " : I don't know how to convert binary values to BigDecimals." );
case TYPE_SERIALIZABLE:
throw new KettleValueException( toString() + " : I don't know how to convert serializable values to BigDecimals." );
default:
throw new KettleValueException( toString() + " : Unknown type " + type + " specified." );
}
} catch ( Exception e ) {
throw new KettleValueException( "Unexpected conversion error while converting value [" + toString()
+ "] to a BigNumber", e );
}
}
@Override
public Boolean getBoolean( Object object ) throws KettleValueException {
if ( object == null ) {
return null;
}
switch ( type ) {
case TYPE_BOOLEAN:View on GitHub (pinned to f3058517a1)