pentaho/pentaho-kettle · error · KettleException
Error reading DBF metadata (in part
Error message
Error reading DBF metadata (in part
What it means
XBase.getFields() reads the DBF column definitions and builds a RowMetaInterface; any Exception during that processing is wrapped as 'Error reading DBF metadata (in part <debug>)', where debug names the phase (e.g. 'get fields from XBase file'). It means the file opened but its field metadata could not be converted into Kettle value metadata.
Solutions
- Read the 'in part <debug>' message and the cause to identify the failing phase.
- Ensure open() succeeded before getFields() — verify the file path is a valid DBF (see earlier open errors).
- Re-export the DBF with standard dBASE III field types (C/N/F/L/D) only; drop unsupported types like memo/BLOB.
- Upgrade JavaDBF/PDI version if the file uses newer DBF dialect features.
Example fix
// before: field of unsupported type BLOB in DBF // after: re-export DBF with only supported types (CHAR, NUMERIC, FLOAT, LOGICAL, DATE)
Defensive patterns
Strategy: try-catch
Validate before calling
try {
xbase.open();
RowMetaInterface fields = xbase.getFields(); // probe metadata early
} catch (KettleException e) {
// fail fast with a clear message before the main run
throw new IllegalStateException("DBF metadata unreadable: " + e.getMessage(), e);
} Try / catch
try {
RowMetaInterface fields = xbase.getFields();
} catch (KettleException e) {
log.error("DBF metadata unreadable: " + e.getCause(), e);
// re-export DBF with standard field types
} Prevention
- Probe getFields() in a small pre-step before the full transformation.
- Restrict source DBF exports to standard dBASE field types.
- Avoid memo/blob columns in files consumed by XBase Input.
- Keep JavaDBF/PDI versions current for newer DBF dialects.
When it happens
Trigger: Calling getFields() (or testGetFields()) after a successful open() when iterating reader.getFieldCount()/getField(...) or building ValueMeta objects throws — e.g. malformed field descriptors, unsupported field types, or a reader in a bad state.
Common situations: DBF with exotic/undocumented field types from a proprietary tool; memo (.dbt/.fpt) fields the JavaDBF lib mishandles; calling getFields() before open() so the reader is null; charset/encoding problems in field names.
Understand the failure class
Background: "failed to read file", EACCES, ENOENT and "could not read <path>" errors: when a program can't read a file from disk — this error's family across 49 libraries.
Related errors
- Error opening DBF metadata
- Error parsing field #
- Error reading DBF file
- XBaseInputMeta.Exception.UnableToReadMetaDataFromXBaseFile
- BaseStreamStepMeta.CheckResult.ResultStepMissing
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/5fb54c9edd661dde.
Report an issue: GitHub.
Appendix: source
Thrown at engine/src/main/java/org/pentaho/di/trans/steps/xbaseinput/XBase.java:145
value.setLength( -1, -1 );
break;
case DBFField.FIELD_TYPE_D: // Date
debug = "Date field";
value = new ValueMetaDate( field.getName() );
value.setLength( -1, -1 );
break;
default:
if ( ( log != null ) && ( log.isDebug() ) ) {
log.logDebug( "Unknown Datatype" + datatype[i] );
}
}
if ( value != null ) {
row.addValueMeta( value );
}
}
} catch ( Exception e ) {
throw new KettleException( "Error reading DBF metadata (in part " + debug + ")", e );
}
return row;
}
public Object[] getRow( RowMetaInterface fields ) throws KettleException {
return getRow( RowDataUtil.allocateRowData( fields.size() ) );
}
public Object[] getRow( Object[] r ) throws KettleException {
try {
// Read the next record
//
Object[] rowobj = reader.nextRecord();
// Are we at the end yet?
//
if ( rowobj == null ) {View on GitHub (pinned to f3058517a1)