{"record":{"id":"9609743f7640798c","repo":"pentaho/pentaho-kettle","slug":"unknown-source-type","errorCode":null,"errorMessage":"Unknown source type: ","messagePattern":"Unknown source type: ","errorType":"exception","errorClass":"KettleValueException","httpStatus":null,"severity":"error","filePath":"core/src/main/java/org/pentaho/di/core/RowMetaAndData.java","lineNumber":312,"sourceCode":"      case ValueMetaInterface.TYPE_STRING:\n        return rowMeta.getString( data, idx ) == null;\n      case ValueMetaInterface.TYPE_BOOLEAN:\n        return rowMeta.getBoolean( data, idx ) == null;\n      case ValueMetaInterface.TYPE_INTEGER:\n        return rowMeta.getInteger( data, idx ) == null;\n      case ValueMetaInterface.TYPE_NUMBER:\n        return rowMeta.getNumber( data, idx ) == null;\n      case ValueMetaInterface.TYPE_BIGNUMBER:\n        return rowMeta.getBigNumber( data, idx ) == null;\n      case ValueMetaInterface.TYPE_BINARY:\n        return rowMeta.getBinary( data, idx ) == null;\n      case ValueMetaInterface.TYPE_DATE:\n      case ValueMetaInterface.TYPE_TIMESTAMP:\n        return rowMeta.getDate( data, idx ) == null;\n      case ValueMetaInterface.TYPE_INET:\n        return rowMeta.getString( data, idx ) == null;\n    }\n    throw new KettleValueException( \"Unknown source type: \" + metaType.getTypeDesc() );\n  }\n\n  /**\n   * Converts string value into specified type. Used for constant injection.\n   */\n  public static Object getStringAsJavaType( String vs, Class<?> destinationType, InjectionTypeConverter converter )\n    throws KettleValueException {\n    if ( String.class.isAssignableFrom( destinationType ) ) {\n      return converter.string2string( vs );\n    } else if ( int.class.isAssignableFrom( destinationType ) ) {\n      return converter.string2intPrimitive( vs );\n    } else if ( Integer.class.isAssignableFrom( destinationType ) ) {\n      return converter.string2integer( vs );\n    } else if ( long.class.isAssignableFrom( destinationType ) ) {\n      return converter.string2longPrimitive( vs );\n    } else if ( Long.class.isAssignableFrom( destinationType ) ) {\n      return converter.string2long( vs );\n    } else if ( boolean.class.isAssignableFrom( destinationType ) ) {","sourceCodeStart":294,"sourceCodeEnd":330,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/core/src/main/java/org/pentaho/di/core/RowMetaAndData.java#L294-L330","documentation":"RowMetaAndData.isEmptyValue() checks whether the value at an index is null for a known Kettle value type. If the row's value meta type is not one of the handled types (String, Number, Integer, Date, Timestamp, InetAddress, Boolean, etc.), it throws this KettleValueException including getTypeDesc(). It guards against silently misinterpreting nullness for unsupported types.","triggerScenarios":"Calling isEmptyValue (directly or via setProperty / createAvroRecord during metadata injection) when the field's ValueMetaInterface type is not covered by the switch, e.g. a Binary, Serializable, or custom value type.","commonSituations":"Metadata injection where the injected field's type was changed to an unhandled type (e.g. TYPE_BINARY) in a transformation step; custom ValueMeta plugins that add new types not supported by RowMetaAndData.","solutions":["Inspect the field's value meta type and convert it to a supported type (e.g. String or Integer) before injecting","Change the step configuration so the injected field uses a standard Kettle value type","Catch KettleValueException and log the offending field name/type","Upgrade Pentaho/Kettle, since newer versions may handle more types"],"exampleFix":"// before\nrowMeta.setValueMeta(idx, new ValueMetaBinary(field));\n// after\nrowMeta.setValueMeta(idx, new ValueMetaString(field));","handlingStrategy":"try-catch","validationCode":"int idx = row.getRowMeta().indexOfValue(fieldName);\nValueMetaInterface vm = row.getRowMeta().getValueMeta(idx);\nswitch (vm.getType()) {\n  case ValueMetaInterface.TYPE_STRING:\n  case ValueMetaInterface.TYPE_NUMBER:\n  case ValueMetaInterface.TYPE_INTEGER:\n  case ValueMetaInterface.TYPE_BOOLEAN:\n  case ValueMetaInterface.TYPE_DATE:\n  case ValueMetaInterface.TYPE_TIMESTAMP:\n  case ValueMetaInterface.TYPE_INET:\n    break; // safe\n  default:\n    throw new IllegalStateException(\"Unsupported type for isEmptyValue: \" + vm.getTypeDesc());\n}","typeGuard":"boolean isSupportedType(ValueMetaInterface vm) {\n  int t = vm.getType();\n  return t == ValueMetaInterface.TYPE_STRING || t == ValueMetaInterface.TYPE_NUMBER\n    || t == ValueMetaInterface.TYPE_INTEGER || t == ValueMetaInterface.TYPE_BOOLEAN\n    || t == ValueMetaInterface.TYPE_DATE || t == ValueMetaInterface.TYPE_TIMESTAMP\n    || t == ValueMetaInterface.TYPE_INET;\n}","tryCatchPattern":"try {\n  boolean empty = row.isEmptyValue(idx);\n} catch (KettleValueException e) {\n  log.error(\"Unsupported value type for field \" + row.getRowMeta().getValueMeta(idx).getTypeDesc(), e);\n}","preventionTips":["Only inject standard Kettle value types (String, Integer, Number, Boolean, Date, Timestamp, InetAddress)","Check ValueMetaInterface.getType() against supported types before calling setProperty/createAvroRecord","Convert exotic types (Binary, Serializable) to String upstream"],"tags":["kettle","rowmeta","metadata-injection","unsupported-type"],"backgroundTag":"incompatible-source-type","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"}