pentaho/pentaho-kettle · error · KettleException
Unable to parse attribute from attribute row: attributeRow
Error message
Unable to parse attribute from attribute row: attributeRow
What it means
parseAttribute could not convert a raw R_ELEMENT_ATTRIBUTE row into a KDBRMetaStoreAttribute (e.g. unreadable id, missing key, or parseAttributeValue failure); any Exception is wrapped in a KettleException naming the offending row.
Solutions
- Inspect the row (from the wrapped cause) and fix or delete the corrupt R_ELEMENT_ATTRIBUTE row
- Re-save the metastore element to rewrite its attributes cleanly
- Check schema compatibility between the repository version that wrote the row and the one reading it
- Wrap metastore reads to log the failing attribute id and skip/repair it
Example fix
// before: blind parse
KDBRMetaStoreAttribute a = delegate.attribute(nsId, elId, row);
// after: validate row first
if (row == null || row.getString("ID_ELEMENT_ATTRIBUTE", null) == null) {
throw new IllegalStateException("Skipping corrupt attribute row for element " + elId);
}
KDBRMetaStoreAttribute a = delegate.attribute(nsId, elId, row); Defensive patterns
Strategy: validation
Validate before calling
if (attributeRow == null || attributeRow.getInteger("ID_ELEMENT_ATTRIBUTE", -1) < 0 || attributeRow.getString("ID_ELEMENT_ATTRIBUTE_KEY", null) == null) {
throw new IllegalArgumentException("Malformed R_ELEMENT_ATTRIBUTE row");
} Type guard
boolean isValidAttributeRow(RowMetaAndData row) { return row != null && row.getInteger("ID_ELEMENT_ATTRIBUTE", -1L) >= 0; } Try / catch
try { KDBRMetaStoreAttribute a = delegate.attribute(nsId, elId, row); } catch (KettleException e) { logWarn("Skipping corrupt attribute row", e); } Prevention
- Never hand-edit metastore tables
- Re-save elements through the metastore API after version upgrades
- Log and quarantine rows that fail to parse
When it happens
Trigger: Calling attribute(namespaceId, elementId, attributeRow) with a row whose ID_ELEMENT_ATTRIBUTE/id/key/value columns are null or whose value fails parseAttributeValue.
Common situations: Metastore rows corrupted by manual edits or failed writes; schema changed between PDI versions so expected columns differ; value encoded by a newer type letter than this reader supports.
Understand the failure class
- Parsing and encoding errors: unexpected token, malformed input — why parsers reject input and how to find the real culprit.
Related errors
- Can't encode object of class : className
- Unknown data type : type
- Can not create element type with id…
- Can not create element type with id
- Can't delete element type with name
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/69e7404d9f85ccab.
Report an issue: GitHub.
Appendix: source
Thrown at engine/src/main/java/org/pentaho/di/repository/kdr/delegates/KettleDatabaseRepositoryMetaStoreDelegate.java:346
// See if this attribute has children...
addAttributes( attribute, elementId, attribute.getObjectId() );
}
}
private KDBRMetaStoreAttribute parseAttribute( ObjectId elementId, RowMetaAndData attributeRow ) throws KettleException {
try {
Long attributeId =
attributeRow.getInteger( KettleDatabaseRepository.FIELD_ELEMENT_ATTRIBUTE_ID_ELEMENT_ATTRIBUTE );
String key = attributeRow.getString( KettleDatabaseRepository.FIELD_ELEMENT_ATTRIBUTE_KEY, null );
String value = attributeRow.getString( KettleDatabaseRepository.FIELD_ELEMENT_ATTRIBUTE_VALUE, null );
Object object = parseAttributeValue( value );
KDBRMetaStoreAttribute attribute = new KDBRMetaStoreAttribute( this, key, object );
attribute.setObjectId( new LongObjectId( attributeId ) );
return attribute;
} catch ( Exception e ) {
throw new KettleException( "Unable to parse attribute from attribute row: " + attributeRow.toString(), e );
}
}
/**
* supported types:
* <p/>
* <pre>
* S : String (java.lang.String)
* D : Date (java.util.Date)
* N : Number (Double)
* I : Integer (Long)
* B : Boolean (Boolean)
*
* Examples
* S:Pentaho Data Integration
* D:2013/08/23 17:25:00
* N:1039348.9347View on GitHub (pinned to f3058517a1)