pentaho/pentaho-kettle · error · KettleException

Unsupported type

Error message

Unsupported type

What it means

GPBulkDataOutput.writeLine throws a KettleException 'Unsupported type' when a row value's data type hits the default branch of the writeLine switch. Only the types GPBulkDataOutput explicitly handles (string, number, integer, date, boolean, big number, binary, timestamp) are accepted; anything else is unsupported for text-format bulk output.

Solutions

  1. Insert a Select Values step before the loader and convert the offending field to a supported type (String, Number, Integer, Date, Boolean, BigNumber or Binary).
  2. Identify which field has the unsupported type via the nested context and fix its producer step.
  3. Upgrade the gp-bulk-loader plugin/Pentaho if the type is supported in newer builds.
  4. Avoid exotic types (INET, custom) in streams feeding bulk text output.

Example fix

// before: field 'ip' of TYPE_INET reaches writeLine -> Unsupported type

// after: Select Values step converts 'ip' to String before GP Bulk Loader
// SelectValuesMeta: fields[i].setName("ip"); fields[i].setConvertToType(ValueMetaInterface.TYPE_STRING);
Defensive patterns

Strategy: validation

Validate before calling

RowMetaInterface prev = transMeta.getPrevStepFields( stepName );
Set<Integer> supported = new HashSet<>( Arrays.asList(
  ValueMetaInterface.TYPE_STRING, ValueMetaInterface.TYPE_NUMBER,
  ValueMetaInterface.TYPE_INTEGER, ValueMetaInterface.TYPE_DATE,
  ValueMetaInterface.TYPE_BOOLEAN, ValueMetaInterface.TYPE_BIGNUMBER,
  ValueMetaInterface.TYPE_BINARY, ValueMetaInterface.TYPE_TIMESTAMP ) );
for ( ValueMetaInterface vm : prev.getValueMetaList() ) {
  if ( !supported.contains( vm.getType() ) ) {
    throw new KettleException( "Unsupported type in field: " + vm.getName() );
  }
}

Prevention

When it happens

Trigger: A stream field whose ValueMetaInterface type is one not covered by the switch (e.g. TYPE_INET, TYPE_TIMESTAMP on older versions, or a custom/plugin value type) flows into the step and reaches writeLine's default branch.

Common situations: Upstream step producing an exotic value type (Internet Address, custom plugin type); a transformation upgraded from a newer Pentaho version whose timestamp/inet types this plugin build predates; misdeclared field type in a User Defined Java Class output.

Related errors


AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13). Data as JSON: /api/errors/d75b7c40e33fd95d. Report an issue: GitHub.

Appendix: source

Thrown at plugins/gp-bulk-loader/core/src/main/java/org/pentaho/di/trans/steps/gpbulkloader/GPBulkDataOutput.java:198

            break;
          case ValueMetaInterface.TYPE_BOOLEAN:
            Boolean b = mi.getBoolean( row, number );
            output.print( enclosure );
            if ( b.booleanValue() ) {
              output.print( "Y" );
            } else {
              output.print( "N" );
            }
            output.print( enclosure );
            break;
          case ValueMetaInterface.TYPE_BINARY:
            byte[] byt = mi.getBinary( row, number );
            output.print( "<startlob>" );
            output.print( byt );
            output.print( "<endlob>" );
            break;
          default:
            throw new KettleException( "Unsupported type" );
        }
      }
    }
    output.print( Const.CR );
  }
}

View on GitHub (pinned to f3058517a1)