pentaho/pentaho-kettle · error · KettleStepException

The table name is not specified (or the input field is…

Error message

The table name is not specified (or the input field is empty)

What it means

Thrown during processRow() initialization when the target table name is taken from the step configuration (not a field) and environmentSubstitute(meta.getTableName()) resolves to an empty string. The step requires a concrete table name to build its SQL.

Solutions

  1. Enter the target table name in the step dialog's 'Target table' field.
  2. If using a variable like ${TARGET_TABLE}, define it in the transformation/job settings, kettle.properties, or via Set Variables.
  3. Test with the variable value echoed (e.g. a 'Write to log' step or Get Variables) to confirm it substitutes non-empty.
  4. If the table name should come from the data, switch on 'table name defined in a field' instead.

Example fix

// before (kettle.properties missing)
// TARGET_TABLE not defined -> substitutes to ""
// after
TARGET_TABLE=customers
Defensive patterns

Strategy: validation

Validate before calling

String table = environmentSubstitute("${TARGET_TABLE}");
if (table == null || table.trim().isEmpty()) {
  throw new ValidationException("TARGET_TABLE variable is not set");
}

Try / catch

catch (KettleStepException e) {
  if (e.getMessage().contains("table name is not specified")) {
    logError("Set the Target table or define its environment variable.");
  }
  throw e;
}

Prevention

When it happens

Trigger: meta.istablenameInField() is false; the 'Target table' field in the dialog is empty, or the environment variable used in the table name (e.g. ${TARGET_TABLE}) is unset or empty at runtime.

Common situations: User forgot to type the table name in the dialog; table name was parameterized with an environment variable that is not defined in the job/kitchen environment; variable typo so it substitutes to empty.

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


AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13). Data as JSON: /api/errors/b9333d35ecc2858b. Report an issue: GitHub.

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/trans/steps/synchronizeaftermerge/SynchronizeAfterMerge.java:676

      data.inputRowMeta = data.outputRowMeta;
      meta.getFields( getTransMeta().getBowl(), data.outputRowMeta, getStepname(), null, null, this, repository,
        metaStore );

      if ( meta.istablenameInField() ) {
        // Cache the position of the table name field
        if ( data.indexOfTableNameField < 0 ) {
          data.indexOfTableNameField = data.inputRowMeta.indexOfValue( meta.gettablenameField() );
          if ( data.indexOfTableNameField < 0 ) {
            String message =
              "It was not possible to find table [" + meta.gettablenameField() + "] in the input fields.";
            logError( message );
            throw new KettleStepException( message );
          }
        }
      } else {
        data.realTableName = environmentSubstitute( meta.getTableName() );
        if ( Utils.isEmpty( data.realTableName ) ) {
          throw new KettleStepException( "The table name is not specified (or the input field is empty)" );
        }
        data.realSchemaTable =
          data.db.getDatabaseMeta().getQuotedSchemaTableCombination( data.realSchemaName, data.realTableName );
      }

      // Cache the position of the operation order field
      if ( data.indexOfOperationOrderField < 0 ) {
        data.indexOfOperationOrderField = data.inputRowMeta.indexOfValue( meta.getOperationOrderField() );
        if ( data.indexOfOperationOrderField < 0 ) {
          String message =
            "It was not possible to find operation field [" + meta.getOperationOrderField()
              + "] in the input stream!";
          logError( message );
          throw new KettleStepException( message );
        }
      }

      data.insertValue = environmentSubstitute( meta.getOrderInsert() );

View on GitHub (pinned to f3058517a1)