pentaho/pentaho-kettle · error · KettleStepException
Please set a value for the missing field(s) type.
Error message
Please set a value for the missing field(s) type.
What it means
In the same putRow() validation loop, a ValueMetaInterface whose getType() <= 0 (undefined/missing type) causes KettleStepException 'Please set a value for the missing field(s) type.' Each outgoing field must have a concrete Kettle data type.
Solutions
- Assign a concrete type, e.g. vmi.setValueType(ValueMetaInterface.TYPE_STRING), before putRow.
- Construct value metas with an explicit type: new ValueMetaString("field") instead of a typeless base.
- Set allowEmptyFieldNamesAndTypes(true) only if untyped fields must be tolerated.
- Use a 'Select Values'/metadata step upstream to force types on unspecified fields.
Example fix
// before
ValueMetaInterface vmi = new ValueMetaBase("field"); // type 0
// after
ValueMetaInterface vmi = new ValueMetaString("field"); Defensive patterns
Strategy: validation
Validate before calling
for (ValueMetaInterface vmi : rowMeta.getValueMetaList()) {
if (vmi.getType() <= 0) vmi.setValueType(ValueMetaInterface.TYPE_STRING); // or throw
} Try / catch
try { putRow(rowMeta, row); }
catch (KettleStepException e) { if (e.getMessage().contains("missing field(s) type")) { forceTypes(rowMeta); putRow(rowMeta, row); } else throw e; } Prevention
- Use typed constructors (ValueMetaString, ValueMetaNumber)
- Force types with a Select Values metadata step upstream
- Never emit TYPE_NONE columns from scripts
When it happens
Trigger: putRow() called with a row meta containing a value meta constructed without a type (type 0 / TYPE_NONE), e.g. new ValueMetaBase("field") with no type assigned, or metadata copied from an undefined source column.
Common situations: Scripting/UDJC steps that create ValueMeta objects but never set the type; 'unspecified' columns passed through from Get Files / Excel stages; merge-join producing fields of unknown type.
Understand the failure class
Background: Invalid enum value errors: "Unknown type", "Invalid scope", "must be one of" — when a string is not on the library's allowed list — this error's family across 23 libraries.
Related errors
- Please set a field name for all field(s) that have 'null'.
- AnalyticQueryMeta.Exception.SubjectFieldNotFound
- At least one slave server is required to be present in…
- BaseStep.SafeMode.Exception.DoubleFieldnames
- BaseStep.SafeMode.Exception.MixingLayout
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/7bfe7ff4afd728de.
Report an issue: GitHub.
Appendix: source
Thrown at engine/src/main/java/org/pentaho/di/trans/step/BaseStep.java:1257
/**
* putRow is used to copy a row, to the alternate rowset(s) This should get priority over everything else!
* (synchronized) If distribute is true, a row is copied only once to the output rowsets, otherwise copies are sent to
* each rowset!
*
* @param row The row to put to the destination rowset(s).
* @throws KettleStepException
*/
@Override
public void putRow( RowMetaInterface rowMeta, Object[] row ) throws KettleStepException {
if ( rowMeta != null ) {
if ( !allowEmptyFieldNamesAndTypes ) {
// check row meta for empty field name (BACKLOG-18004)
for ( ValueMetaInterface vmi : rowMeta.getValueMetaList() ) {
if ( StringUtils.isBlank( vmi.getName() ) ) {
throw new KettleStepException( "Please set a field name for all field(s) that have 'null'." );
}
if ( vmi.getType() <= 0 ) {
throw new KettleStepException( "Please set a value for the missing field(s) type." );
}
}
}
}
getRowHandler().putRow( rowMeta, row );
}
private void handlePutRow( RowMetaInterface rowMeta, Object[] row ) throws KettleStepException {
// Are we pausing the step? If so, stall forever...
//
while ( paused.get() && !stopped.get() ) {
try {
Thread.sleep( 1 );
} catch ( InterruptedException e ) {
throw new KettleStepException( e );
}
}
View on GitHub (pinned to f3058517a1)