{"record":{"id":"203762fbb3c5ba37","repo":"pentaho/pentaho-kettle","slug":"gpload-exception-datafilemissing","errorCode":null,"errorMessage":"GPload.Exception.DataFileMissing","messagePattern":"GPload\\.Exception\\.DataFileMissing","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/gpload/core/src/main/java/org/pentaho/di/trans/steps/gpload/GPLoad.java","lineNumber":202,"sourceCode":"      }\n\n      // throw an exception if we don't have any update columns\n      if ( updateColumn == null ) {\n        throw new KettleException( BaseMessages.getString( PKG, \"GPLoad.Exception.UpdateColumnsNeeded\" ) );\n      }\n\n      if ( !meta.hasUpdateColumn() ) {\n        throw new KettleException( BaseMessages.getString( PKG, \"GPLoad.Exception.UpdateColumnsNeeded\" ) );\n      }\n    }\n\n    // data file validation\n    String dataFilename = meta.getDataFile();\n    if ( !Utils.isEmpty( dataFilename ) ) {\n      dataFilename = environmentSubstitute( dataFilename ).trim();\n    }\n    if ( Utils.isEmpty( dataFilename ) ) {\n      throw new KettleException( BaseMessages.getString( PKG, \"GPload.Exception.DataFileMissing\" ) );\n    }\n\n    // delimiter validation\n    String delimiter = meta.getDelimiter();\n    if ( !Utils.isEmpty( delimiter ) ) {\n      delimiter = environmentSubstitute( delimiter ).trim();\n    }\n    if ( Utils.isEmpty( delimiter ) ) {\n      throw new KettleException( BaseMessages.getString( PKG, \"GPload.Exception.DelimiterMissing\" ) );\n    }\n\n    // Now we start building the contents\n    StringBuffer contents = new StringBuffer( 1000 );\n\n    // Source: GP Admin Guide 3.3.6, page 635:\n    contents.append( GPLoad.GPLOAD_YAML_VERSION ).append( Const.CR );\n    contents.append( \"DATABASE: \" );\n    contents.append( environmentSubstitute( databaseMeta.getDatabaseName() ) );","sourceCodeStart":184,"sourceCodeEnd":220,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/gpload/core/src/main/java/org/pentaho/di/trans/steps/gpload/GPLoad.java#L184-L220","documentation":"GPLoad validates the data file location before building the control file's DATA_FILE section. If the configured data file is empty (or empty after environment-variable substitution and trimming), the control file cannot point gpload at any data, so a KettleException is thrown.","triggerScenarios":"getControlFileContents called (via createControlFile in processRow or testYAMLContents) while meta.getDataFile() is null/empty, or resolves to empty after environmentSubstitute().trim().","commonSituations":"User left the data-file field blank; an environment variable like ${DATA_FILE} is undefined so substitution yields an empty string; data file previously set was cleared during a metadata copy.","solutions":["Set the data file path in the GPLoad step dialog.","Ensure referenced environment variables (e.g. ${DATA_FILE}) are defined at execution time in kettle.properties or the job configuration.","Verify the value has no whitespace-only content after variable substitution.","Configure the data file programmatically via meta.setDataFile(...) before running the transformation."],"exampleFix":"// before\nmeta.setDataFile(\"${DATA_FILE}\"); // env var undefined -> empty -> throws\n// after\n// define DATA_FILE in kettle.properties, or:\nmeta.setDataFile(\"/data/loading/table_input.dat\");","handlingStrategy":"validation","validationCode":"String dataFile = meta.getDataFile() == null ? null : meta.getDataFile().trim();\nif (dataFile == null || dataFile.isEmpty()) {\n  throw new IllegalArgumentException(\"Data file must be set for GPLoad\");\n}","typeGuard":null,"tryCatchPattern":"try {\n  step.createControlFile(meta);\n} catch (KettleException e) {\n  if (e.getMessage().contains(\"DataFileMissing\")) { /* set data file or fix env vars */ }\n  else throw e;\n}","preventionTips":["Always set the data file before saving the step.","If using variables for the path, verify they resolve (log them in a prior step).","Trim and validate variable-based paths in an upstream step.","Keep data-file paths in kettle.properties for consistent environments."],"tags":["kettle","gpload","greenplum","configuration","file"],"backgroundTag":"missing-required-config-field","analyzedSha":"f3058517a153da500bf4551f46d79b91bf8ec552","analyzedAt":"2026-09-13T14:04:16.340Z","contentChangedAt":"2026-09-13T14:04:16.340Z","schemaVersion":2},"datasetVersion":"2026-09-20T23:17:15.980Z"}