{"record":{"id":"ab29412f0914a57c","repo":"pentaho/pentaho-kettle","slug":"gploaddataoutput-exception-typenotsupported","errorCode":null,"errorMessage":"GPLoadDataOutput.Exception.TypeNotSupported","messagePattern":"GPLoadDataOutput\\.Exception\\.TypeNotSupported","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/gpload/core/src/main/java/org/pentaho/di/trans/steps/gpload/GPLoadDataOutput.java","lineNumber":253,"sourceCode":"            } else {\n              output.print( \"N\" );\n            }\n            output.print( enclosure );\n            break;\n          case ValueMetaInterface.TYPE_BINARY:\n            byte[] byt = mi.getBinary( row, number );\n            output.print( \"<startlob>\" );\n            output.print( byt );\n            output.print( \"<endlob>\" );\n            break;\n          case ValueMetaInterface.TYPE_TIMESTAMP:\n            Date time = mi.getDate( row, number );\n            output.print( enclosure );\n            output.print( sdfDateTime.format( time ) );\n            output.print( enclosure );\n            break;\n          default:\n            throw new KettleException( BaseMessages.getString( PKG, \"GPLoadDataOutput.Exception.TypeNotSupported\", v\n                .getType() ) );\n        }\n      }\n    }\n    output.print( Const.CR );\n  }\n}\n","sourceCodeStart":235,"sourceCodeEnd":261,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/gpload/core/src/main/java/org/pentaho/di/trans/steps/gpload/GPLoadDataOutput.java#L235-L261","documentation":"writeLine() formats each field value by the value's ValueMeta type (String, Date, Number, etc.). The default branch throws this KettleException when it encounters a value type it does not know how to serialize into the gpload data file (e.g. Binary, Serializable, Timestamp-like types in this version).","triggerScenarios":"A row field reaching GPload has a type outside the supported set — commonly Binary, Serializable, Internet Address, or a Timestamp/big-number type whose switch branch is absent in this PDI version.","commonSituations":"Feeding binary/blob columns from a table input; upstream step changed a field's type (e.g. String to Binary); upgrading PDI introduced new types while the GPload plugin formatter lags behind.","solutions":["Convert unsupported fields to supported types before GPload (e.g. 'If field value is null'/'Select values' to convert to String or Number, or format dates with a Formula/UDJE step)","Drop unnecessary columns via a Select values step so only supported types reach GPload","Check the plugin's writeLine switch and upgrade the PDI/GPload plugin version that supports the type","For binary data, encode it (Base64) into a String field first"],"exampleFix":"// before\nrow: { id:Number, payload:Binary }\n// after (Select values: payload -> String)\nrow: { id:Number, payload:String } // Base64 or text-encoded","handlingStrategy":"type-guard","validationCode":"for (ValueMetaInterface v : rowMeta.getValueMetaList()) {\n  int t = v.getType();\n  if (!(t == ValueMetaInterface.TYPE_STRING || t == ValueMetaInterface.TYPE_NUMBER\n     || t == ValueMetaInterface.TYPE_INTEGER || t == ValueMetaInterface.TYPE_DATE\n     || t == ValueMetaInterface.TYPE_BOOLEAN || t == ValueMetaInterface.TYPE_BIGNUMBER)) {\n    throw new IllegalStateException(\"Unsupported type for GPload: \" + v.toStringMeta());\n  }\n}","typeGuard":"boolean isGploadSupported(ValueMetaInterface v) {\n  switch (v.getType()) {\n    case ValueMetaInterface.TYPE_STRING: case ValueMetaInterface.TYPE_NUMBER:\n    case ValueMetaInterface.TYPE_INTEGER: case ValueMetaInterface.TYPE_DATE:\n    case ValueMetaInterface.TYPE_BOOLEAN: case ValueMetaInterface.TYPE_BIGNUMBER:\n      return true; default: return false;\n  }\n}","tryCatchPattern":"try { ... } catch (KettleException e) { if (e.getMessage().contains(\"TypeNotSupported\")) { logError(\"Convert field to String/Number before GPload: \" + e.getMessage()); } throw e; }","preventionTips":["Convert Binary/Serializable fields to String (e.g. Base64) before GPload","Insert a Select values step to enforce a flat, supported schema before the load","Pin the PDI plugin version and check its supported types when upgrading","Drop unused complex-typed columns upstream"],"tags":["kettle","pdi","type-mismatch","unsupported-type"],"backgroundTag":"unsupported-operation","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"}