{"record":{"id":"a03049067304fc35","repo":"pentaho/pentaho-kettle","slug":"gpload-exception-nocontrolfilespecified","errorCode":null,"errorMessage":"GPLoad.Exception.NoControlFileSpecified","messagePattern":"GPLoad\\.Exception\\.NoControlFileSpecified","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/gpload/core/src/main/java/org/pentaho/di/trans/steps/gpload/GPLoad.java","lineNumber":402,"sourceCode":"              updateCondition ).append( GPLoad.DOUBLE_QUOTE ).append( Const.CR );\n        }\n      }\n    }\n\n    return contents.toString();\n  }\n\n  /**\n   * Create a control file.\n   *\n   * @param filename\n   * @param meta\n   * @throws KettleException\n   */\n  public void createControlFile( GPLoadMeta meta ) throws KettleException {\n    String filename = meta.getControlFile();\n    if ( Utils.isEmpty( filename ) ) {\n      throw new KettleException( BaseMessages.getString( PKG, \"GPLoad.Exception.NoControlFileSpecified\" ) );\n    } else {\n      filename = environmentSubstitute( filename ).trim();\n      if ( Utils.isEmpty( filename ) ) {\n        throw new KettleException( BaseMessages.getString( PKG, \"GPLoad.Exception.NoControlFileSpecified\" ) );\n      }\n    }\n\n    File controlFile = new File( filename );\n    FileWriter fw = null;\n\n    try {\n      controlFile.createNewFile();\n      fw = new FileWriter( controlFile );\n      fw.write( getControlFileContents( meta, getInputRowMeta() ) );\n    } catch ( IOException ex ) {\n      throw new KettleException( ex.getMessage(), ex );\n    } finally {\n      try {","sourceCodeStart":384,"sourceCodeEnd":420,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/gpload/core/src/main/java/org/pentaho/di/trans/steps/gpload/GPLoad.java#L384-L420","documentation":"createControlFile first validates that the control file name is configured, since gpload must be told which control file to run. If meta.getControlFile() is empty, a KettleException with GPLoad.Exception.NoControlFileSpecified is thrown before any file I/O.","triggerScenarios":"processRow -> createControlFile(meta) with meta.getControlFile() returning null or an empty string.","commonSituations":"Control-file field left blank in the step dialog; metadata exported/imported without the field; step cloned from a template where the path was cleared.","solutions":["Set the control file path in the GPLoad step dialog (e.g. /tmp/load.ctl).","Provide the path via an environment variable and ensure it is defined at runtime.","Set meta.setControlFile(\"/path/to/load.ctl\") programmatically before running the transformation.","If the path should be generated dynamically, compute it in a preceding step and pass it as a variable."],"exampleFix":"// before\nmeta.setControlFile(\"\"); // throws GPLoad.Exception.NoControlFileSpecified\n// after\nmeta.setControlFile(\"/tmp/gpload_control.ctl\");","handlingStrategy":"validation","validationCode":"String ctl = meta.getControlFile();\nif (ctl == null || ctl.trim().isEmpty()) {\n  throw new IllegalArgumentException(\"Control file must be specified\");\n}","typeGuard":null,"tryCatchPattern":"try {\n  step.createControlFile(meta);\n} catch (KettleException e) {\n  if (e.getMessage().contains(\"NoControlFileSpecified\")) { /* set control file path */ }\n  else throw e;\n}","preventionTips":["Always fill the control-file field when configuring GPLoad.","Standardize control-file locations (e.g. /data/gpload/) across environments.","Check imported/cloned steps for blank control-file settings before scheduling.","Set the path programmatically in setup code if steps are built via API."],"tags":["kettle","gpload","greenplum","configuration","file"],"backgroundTag":"empty-required-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"}