pentaho/pentaho-kettle · error · RuntimeException
Unhandled data type
Error message
Unhandled data type '{valueMetaName}' What it means
Inside the row-reading callback, the switch over the SAS column type falls through to default for any type the step does not explicitly handle, throwing a RuntimeException naming the unhandled value meta type. Only the types coded in the switch (character, numeric, etc.) are supported.
Solutions
- Inspect the file's column types and re-export the offending column as a supported type (character or numeric).
- Exclude the unsupported column from the file or from the selected output fields.
- Patch the step's switch to map the type to an appropriate Kettle ValueMeta type.
Example fix
// before: default: throw new RuntimeException("Unhandled data type '" + ValueMetaFactory.getValueMetaName(type));
// after: case TYPE_DATE: row[outputIndex++] = value; break;
// default: throw new RuntimeException(...); Defensive patterns
Strategy: try-catch
Validate before calling
// Only feed files whose columns map to supported types (CHARACTER/NUMERIC)
for (SasField col : sasColumns(file)) {
if (col.getType() != SasType.CHARACTER && col.getType() != SasType.NUMERIC)
throw new IllegalArgumentException("Unsupported SAS column type " + col.getType() + " on " + col.getName());
} Try / catch
try {
// execute transformation
} catch (RuntimeException e) {
if (e.getMessage() != null && e.getMessage().startsWith("Unhandled data type")) {
// exclude/re-type the offending column and re-export the SAS file
}
throw e;
} Prevention
- Pre-audit SAS file column types before ingestion.
- Convert exotic column types (dates, binary) to character/numeric at export.
- Keep the Kettle/SAS input plugin updated so newly supported types are covered.
When it happens
Trigger: A SAS file contains a column whose mapped type (from SasInputHelper) is not covered by the switch statement in row() — e.g. an unexpected or extended SAS data type mapped to an unsupported Kettle type.
Common situations: Reading SAS files produced by tools or SAS versions emitting column types the step does not map; unusual column kinds (dates stored as exotic types, binary columns) in the file.
Related errors
- Unhandled SAS data type encountered
- Field nr in file ' ' is called ' ' while it was called ' '…
- Field nr in file ' ' is of data type ' ' while it was ' '…
- Selected field ' ' couldn't be found in file
- There was an error reading from SAS7BAT file
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/b7745632f418280c.
Report an issue: GitHub.
Appendix: source
Thrown at engine/src/main/java/org/pentaho/di/trans/steps/sasinput/SasInput.java:200
// Only pick those fields that we're interested in.
//
int outputIndex = getInputRowMeta().size();
for ( int i = 0; i < data.fieldIndexes.size(); i++ ) {
int fieldIndex = data.fieldIndexes.get( i );
int type = data.fileLayout.getValueMeta( fieldIndex ).getType();
switch ( type ) {
case ValueMetaInterface.TYPE_STRING:
row[outputIndex++] = rowData[fieldIndex];
break;
case ValueMetaInterface.TYPE_NUMBER:
Double value = (Double) rowData[fieldIndex];
if ( value.equals( Double.NaN ) ) {
value = null;
}
row[outputIndex++] = value;
break;
default:
throw new RuntimeException( "Unhandled data type '" + ValueMetaFactory.getValueMetaName( type ) );
}
}
// Convert the data type of the new data to the requested data types
//
convertData( data.fileLayout, row, data.outputRowMeta );
// Pass along the row to further steps...
//
putRow( data.outputRowMeta, row );
// System.out.println(rowNumber+" ---- passed row : "+Arrays.toString(rowData));
return !isStopped();
} catch ( Exception e ) {
throw new RuntimeException( "There was an error reading from SAS7BAT file '" + filename + "'", e );
}
}View on GitHub (pinned to f3058517a1)