pentaho/pentaho-kettle · error · KettleException
SASInput.Log.Error.UnableToFindFilenameField
Error message
SASInput.Log.Error.UnableToFindFilenameField
What it means
KettleException thrown by the SAS Input step's processRow when the filename field configured in meta.getAcceptingField() is not present in the incoming row stream. The step expects to receive files via the 'accept file from field' mechanism, so it looks up the field index in the input RowMeta and fails with localized message SASInput.Log.Error.UnableToFindFilenameField when indexOfValue returns -1.
Solutions
- Open the SAS Input step dialog and re-select the correct 'filename field' from the incoming fields list.
- Verify the previous step actually outputs that field (use 'Get fields' in the dialog or preview the upstream step).
- Ensure the hop providing the file names is connected and not removed by an earlier edit.
- If files should be specified statically instead, disable 'Accept file names from previous step' and configure the file tab directly.
Example fix
// before: field renamed upstream, accepting field stale
meta.setAcceptingField("filename_old");
// after: match the actual upstream field name
meta.setAcceptingField("filename"); Defensive patterns
Strategy: validation
Validate before calling
// Before running, verify the upstream step outputs the accepting field
RowMetaInterface prev = transMeta.getPrevStepFields(stepMeta);
if (prev.indexOfValue(meta.getAcceptingField()) < 0) {
throw new IllegalStateException("Upstream does not provide field: " + meta.getAcceptingField());
} Type guard
if (meta.getAcceptingField() == null || meta.getAcceptingField().isEmpty()) {
throw new IllegalStateException("Accepting filename field is not configured");
} Try / catch
try {
step.init(meta, data);
transMeta.prepareExecution(new String[0]);
} catch (KettleException e) {
if (e.getMessage().contains("UnableToFindFilenameField")) {
log.error("Configure the SAS Input 'accepting field' to match an upstream column");
}
} Prevention
- Re-open the step dialog and use 'Get fields' after changing upstream steps.
- Rename fields in one place only; check all dependent steps after renames.
- Preview upstream rows before executing the transformation.
- Disable 'accept filenames from previous step' when files are static.
When it happens
Trigger: processRow executes with accepting-filename mode enabled and the previous step's output does not contain the field named by the 'accepting field' setting; getInputRowMeta().indexOfValue returns < 0.
Common situations: Typo in the accepting field name; the upstream step was renamed or removed the field; the hop no longer exists so the input row layout lacks the field; transformation copied between environments where upstream metadata changed.
Related errors
- All input files need to have the same number of fields. File
- AccessInput.Exception.CouldnotFindField
- AccessInput.Log.NoField
- AutoDoc.Exception.FilenameFieldNotFound
- AutoDoc.Exception.FileTypeFieldNotFound
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/afd4cde54b40f9b1.
Report an issue: GitHub.
Appendix: source
Thrown at engine/src/main/java/org/pentaho/di/trans/steps/sasinput/SasInput.java:84
// No more work to do...
//
setOutputDone();
return false;
}
// First we see if we need to get a list of files from input...
//
if ( first ) {
// The output row meta data, what does it look like?
//
data.outputRowMeta = new RowMeta();
// See if the input row contains the filename field...
//
int idx = getInputRowMeta().indexOfValue( meta.getAcceptingField() );
if ( idx < 0 ) {
throw new KettleException( BaseMessages.getString(
PKG, "SASInput.Log.Error.UnableToFindFilenameField", meta.getAcceptingField() ) );
}
// Determine the output row layout
//
data.outputRowMeta = getInputRowMeta().clone();
meta.getFields( getTransMeta().getBowl(), data.outputRowMeta, getStepname(), null, null, this, repository,
metaStore );
}
String rawFilename = getInputRowMeta().getString( fileRowData, meta.getAcceptingField(), null );
final String filename =
KettleVFS.getFilename( KettleVFS.getInstance( getTransMeta().getBowl() ).getFileObject( rawFilename ) );
data.helper = new SasInputHelper( filename );
logBasic( BaseMessages.getString( PKG, "SASInput.Log.OpenedSASFile" ) + " : [" + data.helper + "]" );
// verify the row layout...View on GitHub (pinned to f3058517a1)