pentaho/pentaho-kettle · error · KettleException

SalesforceInsertDialog.FieldsMissing.DialogMessage

Error message

SalesforceInsertDialog.FieldsMissing.DialogMessage

What it means

SalesforceInsert throws this when the update-lookup (field mapping grid) in the step configuration is empty. In processRow(), data.nrfields = meta.getUpdateLookup().length is checked at step init; if 0 fields are mapped, the step cannot build its output row meta and aborts with this message.

Solutions

  1. Open the Salesforce Insert step dialog and populate the field mapping table with at least one field/value pair
  2. Verify meta.getUpdateLookup() is populated in the saved .ktr or repository metadata
  3. Re-enter the mapping if it was lost during metadata migration

Example fix

// before (config)
<fields></fields>  // empty mapping
// after (config)
<fields><field><name>FirstName</name><update>FirstName</update></field></fields>
Defensive patterns

Strategy: validation

Validate before calling

StepMeta stepMeta = transMeta.findStep("Salesforce Insert");
SalesforceInsertMeta meta = (SalesforceInsertMeta) stepMeta.getStepMetaInterface();
if (meta.getUpdateLookup() == null || meta.getUpdateLookup().length == 0) {
  throw new IllegalStateException("Salesforce Insert has no field mapping configured");
}

Try / catch

try {
  trans.execute(null);
} catch (KettleException e) {
  if (e.getMessage() != null && e.getMessage().contains("FieldsMissing")) {
    log.error("Salesforce Insert mapping grid is empty — configure it in the step dialog");
  }
}

Prevention

When it happens

Trigger: processRow() executed with the Salesforce Insert step's field mapping table containing zero rows — i.e. the step was added/configured without mapping any Salesforce fields.

Common situations: Deploying a transformation where the mapping grid was never filled; mapping lost after a metadata migration or copy-paste; user cleared the grid believing values are optional.

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/197657518677e763. Report an issue: GitHub.

Appendix: source

Thrown at plugins/salesforce/core/src/main/java/org/pentaho/di/trans/steps/salesforceinsert/SalesforceInsert.java:80

        flushBuffers();
      }
      setOutputDone();
      return false;
    }

    // If we haven't looked at a row before then do some basic setup.
    if ( first ) {
      first = false;

      data.sfBuffer = new SObject[meta.getBatchSizeInt()];
      data.outputBuffer = new Object[meta.getBatchSizeInt()][];

      // get total fields in the grid
      data.nrfields = meta.getUpdateLookup().length;

      // Check if field list is filled
      if ( data.nrfields == 0 ) {
        throw new KettleException( BaseMessages.getString(
          PKG, "SalesforceInsertDialog.FieldsMissing.DialogMessage" ) );
      }

      // Create the output row meta-data
      data.inputRowMeta = getInputRowMeta().clone();
      data.outputRowMeta = data.inputRowMeta.clone();
      meta.getFields( getTransMeta().getBowl(), data.outputRowMeta, getStepname(), null, null, this, repository,
                      metaStore );

      // Build the mapping of input position to field name
      data.fieldnrs = new int[meta.getUpdateStream().length];
      for ( int i = 0; i < meta.getUpdateStream().length; i++ ) {
        data.fieldnrs[i] = getInputRowMeta().indexOfValue( meta.getUpdateStream()[i] );
        if ( data.fieldnrs[i] < 0 ) {
          throw new KettleException( BaseMessages.getString( PKG, "SalesforceInsert.CanNotFindField", meta
            .getUpdateStream()[i] ) );
        }
      }

View on GitHub (pinned to f3058517a1)