{"record":{"id":"2dc36fe8fe2c27dc","repo":"pentaho/pentaho-kettle","slug":"unhandled-metadata-injection-of-attribute","errorCode":null,"errorMessage":"Unhandled metadata injection of attribute: ","messagePattern":"Unhandled metadata injection of attribute: ","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"plugins/monet-db-bulk-loader/impl/src/main/java/org/pentaho/di/trans/steps/monetdbbulkloader/MonetDBBulkLoaderMeta.java","lineNumber":945,"sourceCode":"          tableName = (String) entry.getValue();\n        } else if ( entry.getKey().equals( \"LOGFILE\" ) ) {\n          logFile = (String) entry.getValue();\n        } else if ( entry.getKey().equals( \"FIELD_SEPARATOR\" ) ) {\n          fieldSeparator = (String) entry.getValue();\n        } else if ( entry.getKey().equals( \"FIELD_ENCLOSURE\" ) ) {\n          fieldEnclosure = (String) entry.getValue();\n        } else if ( entry.getKey().equals( \"NULL_REPRESENTATION\" ) ) {\n          setNULLrepresentation( (String) entry.getValue() );\n        } else if ( entry.getKey().equals( \"ENCODING\" ) ) {\n          encoding = (String) entry.getValue();\n        } else if ( entry.getKey().equals( \"BUFFER_SIZE\" ) ) {\n          bufferSize = (String) entry.getValue();\n        } else if ( entry.getKey().equals( \"TRUNCATE\" ) ) {\n          truncate = (Boolean) entry.getValue();\n        } else if ( entry.getKey().equals( \"FULLY_QUOTE_SQL\" ) ) {\n          fullyQuoteSQL = (Boolean) entry.getValue();\n        } else {\n          throw new RuntimeException( \"Unhandled metadata injection of attribute: \"\n              + attr.toString() + \" - \" + attr.getDescription() );\n        }\n      } else {\n        // The data sets...\n        //\n        if ( attr.getKey().equals( \"MAPPINGS\" ) ) {\n          List<StepInjectionMetaEntry> selectMappings = entry.getDetails();\n\n          fieldTable = new String[selectMappings.size()];\n          fieldStream = new String[selectMappings.size()];\n          fieldFormatOk = new boolean[selectMappings.size()];\n\n          for ( int row = 0; row < selectMappings.size(); row++ ) {\n            StepInjectionMetaEntry selectField = selectMappings.get( row );\n\n            List<StepInjectionMetaEntry> fieldAttributes = selectField.getDetails();\n            //CHECKSTYLE:Indentation:OFF\n            for ( int i = 0; i < fieldAttributes.size(); i++ ) {","sourceCodeStart":927,"sourceCodeEnd":963,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/monet-db-bulk-loader/impl/src/main/java/org/pentaho/di/trans/steps/monetdbbulkloader/MonetDBBulkLoaderMeta.java#L927-L963","documentation":"During metadata injection (stepInjectionMetadata / loadFromInjectedMetadata), MonetDBBulkLoaderMeta only recognizes a fixed set of top-level attributes (e.g. CONNECTIONNAME, SCHEMANAME, TABLENAME, TRUNCATE, BUFFER_SIZE, FULLY_QUOTE_SQL). Any injected key outside this whitelist throws a RuntimeException with 'Unhandled metadata injection of attribute: ...'. This is a deliberate fail-fast guard against injecting attributes the step cannot map.","triggerScenarios":"Using the Metadata Injection (ETL Metadata Injector) step to feed a mapping row containing an attribute key that is not one of the loader's supported top-level keys — e.g. a typo like 'TABLE NAME', an old/renamed key, or an attribute from a different step's injection spec.","commonSituations":"Typos in the injector's target-field list; injecting attributes copied from the Table Output or other loader steps; version drift where a newer/older plugin supports different attribute keys; programmatically building injection maps with wrong key names.","solutions":["Read the exception's attr name/description, and correct the injected attribute key to one of the supported keys: CONNECTIONNAME, SCHEMANAME, TABLENAME, TRUNCATE, BUFFER_SIZE, FULLY_QUOTE_SQL.","Check the plugin source (MonetDBBulkLoaderMeta.loadFromInjectedMetadata) for the exact case-sensitive key strings your PDI version accepts.","Remove or drop the unsupported field from the Metadata Injection step's mapping so it is not passed to this step.","If the attribute genuinely is supported in another plugin version, align plugin/PDI versions before injecting."],"exampleFix":"// before (injection row key)\nkey = \"TABLE_NAME\"  // throws Unhandled metadata injection of attribute\n// after\nkey = \"TABLENAME\"   // whitelisted in loadFromInjectedMetadata","handlingStrategy":"validation","validationCode":"// Java: verify injected keys against the supported whitelist before injecting\njava.util.Set<String> supported = new java.util.HashSet<>(java.util.Arrays.asList(\n    \"CONNECTIONNAME\", \"SCHEMANAME\", \"TABLENAME\", \"TRUNCATE\", \"BUFFER_SIZE\", \"FULLY_QUOTE_SQL\"));\nfor (String key : injectedKeys) {\n  if (!supported.contains(key)) {\n    throw new IllegalArgumentException(\"Unsupported injection key for MonetDB Bulk Loader: \" + key);\n  }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Only inject attributes listed in MonetDBBulkLoaderMeta's injection whitelist; check the source for your plugin version.","Never copy injection field lists from other steps (Table Output etc.); each step has its own spec.","Keep the plugin and PDI versions aligned to avoid attribute-set drift.","Test metadata injections on a scratch transformation before applying to production."],"tags":["kettle","monetdb","metadata-injection","unsupported-attribute"],"backgroundTag":"unsupported-enum-value","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"}