{"record":{"id":"5180d206aa34a7dd","repo":"pentaho/pentaho-kettle","slug":"gpload-exception-targettablenamemissing","errorCode":null,"errorMessage":"GPLoad.Exception.TargetTableNameMissing","messagePattern":"GPLoad\\.Exception\\.TargetTableNameMissing","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/gpload/core/src/main/java/org/pentaho/di/trans/steps/gpload/GPLoad.java","lineNumber":152,"sourceCode":"    boolean[] updateColumn = meta.getUpdateColumn();\n\n    // TODO: All this validation could be placed in it's own method,\n\n    // table name validation\n    DatabaseMeta databaseMeta = meta.getDatabaseMeta();\n    String schemaName = meta.getSchemaName();\n    String targetTableName = meta.getTableName();\n\n    // TODO: What is schema name to a GreenPlum database?\n    // Testing has been with an empty schema name\n    // We will set it to an empty string if it is null\n    // If it is not null then we will process what it is\n    if ( schemaName == null ) {\n      schemaName = \"\";\n    }\n\n    if ( targetTableName == null ) {\n      throw new KettleException( BaseMessages.getString( PKG, \"GPLoad.Exception.TargetTableNameMissing\" ) );\n    }\n    targetTableName = environmentSubstitute( targetTableName ).trim();\n    if ( Utils.isEmpty( targetTableName ) ) {\n      throw new KettleException( BaseMessages.getString( PKG, \"GPLoad.Exception.TargetTableNameMissing\" ) );\n    }\n\n    // Schema name should be unquoted (gpload yaml parse error)\n    schemaName = environmentSubstitute( schemaName );\n    if ( Utils.isEmpty( schemaName ) ) {\n      schemaName = databaseMeta.getPreferredSchemaName();\n    }\n    if ( Utils.isEmpty( schemaName ) ) {\n      schemaName = \"\";\n    } else {\n      schemaName = schemaName + \".\";\n    }\n    targetTableName = schemaName + databaseMeta.quoteField( targetTableName );\n","sourceCodeStart":134,"sourceCodeEnd":170,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/gpload/core/src/main/java/org/pentaho/di/trans/steps/gpload/GPLoad.java#L134-L170","documentation":"Thrown by GPLoad.getControlFileContents when the target table name is null while generating the gpload YAML control file. The method substitutes environment variables and validates the table name before writing the control file used by the gpload utility.","triggerScenarios":"Calling getControlFileContents (directly or via testYAMLContents/createControlFile) when GPLoadMeta.targetTableName is null at execution time.","commonSituations":"Step not fully configured; table-name variable unset in the environment so substitution yields null/empty; transformation edited programmatically (metadata API) leaving the field null.","solutions":["Set the target table name in the GPLoad step dialog and save","Define any variable used for the table name (kettle.properties / run configuration) before execution","Validate configuration with the step's Test/preview before running the transformation"],"exampleFix":"// before\nGPLoadMeta meta = new GPLoadMeta(); // targetTableName never set\nmeta.setTargetTableName( null );\n// after\nmeta.setTargetTableName( \"public.load_target\" );","handlingStrategy":"validation","validationCode":"// before createControlFile\nString table = environmentSubstitute( meta.getTargetTableName() );\nif ( table == null || table.trim().isEmpty() ) {\n  throw new IllegalStateException( \"GPLoad target table not configured\" );\n}","typeGuard":"boolean tableSet = meta.getTargetTableName() != null && !meta.getTargetTableName().trim().isEmpty();","tryCatchPattern":"try { String yaml = gpload.getControlFileContents(); } catch ( KettleException e ) { if ( e.getMessage().contains( \"TargetTableNameMissing\" ) ) { /* fix config */ } }","preventionTips":["Set the target table in the GPLoad dialog before saving","Define any table-name variables in kettle.properties per environment","Run testYAMLContents / the step's Test action before production runs"],"tags":["kettle","gpload","configuration","null-table-name"],"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"}