apache/seatunnel · error · JdbcConnectorException
JdbcConnectorErrorCode.DONT_SUPPORT_SINK
JdbcConnectorErrorCode.DONT_SUPPORT_SINK
Error message
The Presto jdbc connector don't support sink
What it means
PrestoJdbcRowConverter.toExternal unconditionally throws JdbcConnectorException with DONT_SUPPORT_SINK: the Presto JDBC dialect only implements reading (source), not writing. Any attempt to use Presto as a SeaTunnel sink fails immediately when the converter is asked to bind a row to a PreparedStatement.
Source
Thrown at seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/internal/dialect/presto/PrestoJdbcRowConverter.java:43
import org.apache.seatunnel.connectors.seatunnel.jdbc.internal.dialect.DatabaseIdentifier;
import javax.annotation.Nullable;
import java.sql.PreparedStatement;
public class PrestoJdbcRowConverter extends AbstractJdbcRowConverter {
@Override
public String converterName() {
return DatabaseIdentifier.PRESTO;
}
@Override
public PreparedStatement toExternal(
TableSchema tableSchema,
@Nullable TableSchema databaseTableSchema,
SeaTunnelRow row,
PreparedStatement statement) {
throw new JdbcConnectorException(
JdbcConnectorErrorCode.DONT_SUPPORT_SINK,
"The Presto jdbc connector don't support sink");
}
}
View on GitHub (pinned to cf67b549a7)
Solutions
- Use a database that supports JDBC sink (e.g. MySQL, PostgreSQL) instead of Presto for the sink side
- Keep Presto as a source only and write results to a real sink connector
- If the backend is actually Trino, check whether a Trino-specific dialect/sink support exists in your SeaTunnel version and upgrade if added
Example fix
// before
Presto {
url = "jdbc:presto://..."
}
Sink {
... // uses Presto dialect -> throws
}
// after
Presto {
url = "jdbc:presto://..."
} # source only
Mysql {
url = "jdbc:mysql://..."
} # sink target Defensive patterns
Strategy: validation
Validate before calling
if (dialectName.equals("presto") && isSinkConnector) {
throw new IllegalArgumentException("Presto dialect cannot be used as a sink");
} Try / catch
try {
sinkWriter.write(row);
} catch (JdbcConnectorException e) {
if (e.getJdbcConnectorErrorCode() == JdbcConnectorErrorCode.DONT_SUPPORT_SINK) {
// switch sink connector
}
} Prevention
- Check dialect source/sink support matrix before designing pipelines
- Use Presto/Trino only as sources; persist to a real database sink
- Validate connector direction capability at job-planning time
When it happens
Trigger: Configuring a Presto connection as a sink; any sink write path that calls toExternal on a Presto RowConverter, including auto table creation or data writing.
Common situations: Users assume any JDBC dialect works bidirectionally and configure Presto as a sink to persist data; accidentally selecting the Presto dialect for a Trino/DB that should be a sink.
Related errors
- DONT_SUPPORT_SINK
- Unsupported data format type:
- CONNECT_FAILED
- ILLEGAL_ARGUMENT
- Not supported for list databases for iris
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/18bb199384ed8226.
Report an issue: GitHub.