pentaho/pentaho-kettle · error · KettleException
Truncate table is not supported!
Error message
Truncate table is not supported!
What it means
MonetDBBulkLoader.truncate builds its statement from the database meta's getTruncateTableStatement(). When that returns null — the configured dialect does not support TRUNCATE for this target — a KettleException is thrown. It protects the step from executing an invalid or fallback statement.
Solutions
- Verify the connection's database type is MonetDB (or a dialect implementing getTruncateTableStatement)
- If the dialect doesn't support truncate, disable truncate and run a separate Execute SQL DELETE step instead
- Upgrade PDI/database plugin versions so the dialect supports truncate statements
- Confirm the schemaTable name resolved correctly (bad table resolution can short-circuit statement generation)
Example fix
// before: truncate enabled on an unsupported-dialect connection Truncate table = true (connection: Generic DB) // after Truncate table = false; use an 'Execute SQL' step: DELETE FROM schema.table
Defensive patterns
Strategy: fallback
Validate before calling
// Detect truncate support before enabling the option
String stmt = meta.getDatabaseMeta().getTruncateTableStatement(null, "schema.table");
if (stmt == null) {
System.out.println("Dialect " + meta.getDatabaseMeta().getPluginId()
+ " does not support TRUNCATE; disable truncate or use DELETE");
} Type guard
null
Try / catch
try {
step.run();
} catch (KettleException e) {
if (e.getMessage().contains("Truncate table is not supported")) {
logError("Switch to a DELETE-based clear step or fix the connection dialect");
}
} Prevention
- Use a genuine MonetDB connection type for the bulk loader step
- Don't reuse generic/ODBC connections for MonetDB bulk loading
- Re-verify the truncate option after any connection-type change
- Test the flow on staging after database connection migrations
When it happens
Trigger: execute() sees the truncate option enabled and calls truncate(); the configured DatabaseMeta dialect returns null from getTruncateTableStatement (unsupported dialect).
Common situations: Pointing the bulk loader connection at a non-MonetDB or unsupported database dialect; custom/modified connection type; older database plugin lacking truncate support for the dialect.
Understand the failure class
Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.
Related errors
- Error serializing rows of data to the MonetDB API (MAPI).
- Error while connecting to MonetDB for bulk loading :
- Error while truncating table
- An error occurred writing data to the MonetDB API (MAPI)…
- Binding type + soapBindingElem + encountered. The Web…
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/f0130ee7cef49ed4.
Report an issue: GitHub.
Appendix: source
Thrown at plugins/monet-db-bulk-loader/impl/src/main/java/org/pentaho/di/trans/steps/monetdbbulkloader/MonetDBBulkLoader.java:387
//
line.append( data.newline );
// Now that we have the line, grab the content and store it in the buffer...
//
data.rowBuffer[data.bufferIndex] = line.toString(); // line.toByteArray();
data.bufferIndex++;
} catch ( Exception e ) {
throw new KettleException( "Error serializing rows of data to the MonetDB API (MAPI).", e );
}
}
public void truncate() throws KettleException {
String cmd;
String table = data.schemaTable;
String truncateStatement = meta.getDatabaseMeta().getTruncateTableStatement( null, table );
if ( truncateStatement == null ) {
throw new KettleException( "Truncate table is not supported!" );
}
cmd = truncateStatement + ";";
try {
executeSql( cmd );
} catch ( Exception e ) {
throw new KettleException( "Error while truncating table " + table, e );
}
// try to update the metadata registry
util.updateMetadata( meta, -1 );
if ( log.isDetailed() ) {
logDetailed( "Successfull: " + cmd );
}
}
public void drop() throws KettleException {View on GitHub (pinned to f3058517a1)