pentaho/pentaho-kettle · error · KettleException
ColumnExists.Error.TablenameFieldMissing
Error message
ColumnExists.Error.TablenameFieldMissing
What it means
The ColumnExists step is configured to read the table name from an incoming field (isTablenameInField=true), but the 'Dynamic tablename field' setting is empty. The step cannot determine which table to check without it, so it logs and throws a KettleException, aborting processRow.
Solutions
- Open the ColumnExists step dialog and set 'The tablename fieldname' to a valid incoming field name
- Uncheck 'tablename defined in a field?' if you intended to use a static table name
- Validate the saved ktr XML contains <dynamic_tablename_field> before running
Example fix
// before (dialog XML missing field) <istablenameInfield>Y</istablenameInfield> // after <istablenameInfield>Y</istablenameInfield> <dynamic_tablename_field>TABLE_NAME</dynamic_tablename_field>
Defensive patterns
Strategy: validation
Validate before calling
if (meta.isTablenameInField() && (meta.getDynamicTablenameField() == null || meta.getDynamicTablenameField().isEmpty())) {
throw new IllegalStateException("ColumnExists: tablename field required when 'tablename in field' is enabled");
} Try / catch
try { step.processRow(); } catch (KettleException e) { log.error("ColumnExists config error: " + e.getMessage(), e); throw e; } Prevention
- Always click Get Fields on the step dialog after enabling 'tablename defined in a field'
- Validate saved ktr XML in CI (grep for dynamic_tablename_field)
- Never hand-edit istablenameInfield without setting the field
When it happens
Trigger: processRow runs with meta.isTablenameInField()==true and Utils.isEmpty(meta.getDynamicTablenameField()) returns true — i.e. the 'tablename field' textbox on the step dialog was left blank while 'tablename defined in a field' is checked.
Common situations: Importing a transformation XML/repo entry where the field was never saved; checking the dynamic-table option but forgetting to pick the field; copying the step and resetting the field name.
Understand the failure class
Background: "is required", "must be set", "missing required field": configuration validation errors across open-source libraries — this error's family across 36 libraries.
Related errors
- SymmetricCryptoTrans.Exception.MissingMessageField
- ZipFile.Exception.EmptyMovetoFolder
- Calculator.Error.NoNameField
- ChangeFileEncoding.Error.FilenameFieldMissing
- ChangeFileEncoding.Error.TargetFilenameFieldMissing
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/4841dcbbf6af3df3.
Report an issue: GitHub.
Appendix: source
Thrown at plugins/core/impl/src/main/java/org/pentaho/di/trans/steps/columnexists/ColumnExists.java:77
boolean columnexists = false;
if ( first ) {
first = false;
data.outputRowMeta = getInputRowMeta().clone();
meta.getFields( getTransMeta().getBowl(), data.outputRowMeta, getStepname(), null, null, this, repository,
metaStore );
// Check is columnname field is provided
if ( Utils.isEmpty( meta.getDynamicColumnnameField() ) ) {
logError( BaseMessages.getString( PKG, "ColumnExists.Error.ColumnnameFieldMissing" ) );
throw new KettleException( BaseMessages.getString( PKG, "ColumnExists.Error.ColumnnameFieldMissing" ) );
}
if ( meta.isTablenameInField() ) {
// Check is tablename field is provided
if ( Utils.isEmpty( meta.getDynamicTablenameField() ) ) {
logError( BaseMessages.getString( PKG, "ColumnExists.Error.TablenameFieldMissing" ) );
throw new KettleException( BaseMessages.getString( PKG, "ColumnExists.Error.TablenameFieldMissing" ) );
}
// cache the position of the field
if ( data.indexOfTablename < 0 ) {
data.indexOfTablename = getInputRowMeta().indexOfValue( meta.getDynamicTablenameField() );
if ( data.indexOfTablename < 0 ) {
// The field is unreachable !
logError( BaseMessages.getString( PKG, "ColumnExists.Exception.CouldnotFindField" ) + "["
+ meta.getDynamicTablenameField() + "]" );
throw new KettleException( BaseMessages.getString( PKG, "ColumnExists.Exception.CouldnotFindField",
meta.getDynamicTablenameField() ) );
}
}
} else {
if ( !Utils.isEmpty( data.schemaname ) ) {
data.tablename = data.db.getDatabaseMeta().getQuotedSchemaTableCombination( data.schemaname, data.tablename );
} else {
data.tablename = data.db.getDatabaseMeta().quoteField( data.tablename );View on GitHub (pinned to f3058517a1)