pentaho/pentaho-kettle · error · KettleStepException

The name of the table is not specified!

Error message

The name of the table is not specified!

What it means

Thrown in lookupValues() when the step is configured to take the target table name from a field (istablenameInField), but the value read from that field on the current row is empty/null. The step cannot build the quoted schema-table combination for its SQL without a table name.

Solutions

  1. Fix the upstream data so the table-name field is always populated for every row reaching the step.
  2. Confirm the 'Name of table field' dialog option selects the correct non-empty column.
  3. Add a Filter rows step rejecting empty table-name values before this step.
  4. If the table is actually fixed, disable 'table name defined in a field' and type the table name directly.

Example fix

// before
SELECT target_table FROM routes; // target_table can be NULL
// after
SELECT COALESCE(target_table, 'default_table') AS target_table FROM routes;
Defensive patterns

Strategy: validation

Validate before calling

// Pre-validate rows feeding the step
String tableName = getFieldValue(row, "target_table");
if (tableName == null || tableName.trim().isEmpty()) {
  throw new ValidationException("target_table is empty for row: " + row);
}

Try / catch

catch (KettleStepException e) {
  if (e.getMessage().contains("name of the table is not specified")) {
    logError("Dynamic table name empty; check table-name field values.");
  }
  throw e;
}

Prevention

When it happens

Trigger: meta.istablenameInField() is true and data.inputRowMeta.getString(row, indexOfTableNameField) returns an empty string or null; Utils.isEmpty() then triggers KettleStepException.

Common situations: The table-name field in the input stream contains nulls for some rows; wrong field selected in 'The table name is defined in a field' option; upstream expression that builds the table name evaluates to empty; case sensitivity/truncation in the source column.

Understand the failure class

Background: "must not be empty", "cannot be empty" — required-field validation errors across open-source libraries — this error's family across 41 libraries.

Related errors


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

Appendix: source

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

    boolean batchProblem = false;

    data.lookupFailure = false;
    boolean performInsert = false;
    boolean performUpdate = false;
    boolean performDelete = false;
    boolean lineSkipped = false;

    try {
      if ( operation == null ) {
        throw new KettleException( BaseMessages.getString( PKG, "SynchronizeAfterMerge.Log.OperationFieldEmpty", meta
          .getOperationOrderField() ) );
      }

      if ( meta.istablenameInField() ) {
        // get dynamic table name
        data.realTableName = data.inputRowMeta.getString( row, data.indexOfTableNameField );
        if ( Utils.isEmpty( data.realTableName ) ) {
          throw new KettleStepException( "The name of the table is not specified!" );
        }
        data.realSchemaTable =
          data.db.getDatabaseMeta().getQuotedSchemaTableCombination( data.realSchemaName, data.realTableName );
      }

      if ( operation.equals( data.insertValue ) ) {
        // directly insert data into table
        /*
         *
         * INSERT ROW
         */

        if ( log.isRowLevel() ) {
          logRowlevel( BaseMessages.getString( PKG, "SynchronizeAfterMerge.InsertRow", Arrays.toString( row ) ) );
        }

        // The values to insert are those in the update section
        //

View on GitHub (pinned to f3058517a1)