apache/seatunnel · error · JdbcConnectorException
DONT_SUPPORT_SINK
DONT_SUPPORT_SINK
Error message
The Hive jdbc connector don't support sink
What it means
HiveJdbcRowConverter.toExternal is the write-path (sink) converter for the Hive dialect, and Hive over JDBC is read-only in this connector; any attempt to write rows throws JdbcConnectorException with DONT_SUPPORT_SINK.
Source
Thrown at seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/internal/dialect/hive/HiveJdbcRowConverter.java:44
import javax.annotation.Nullable;
import java.sql.PreparedStatement;
public class HiveJdbcRowConverter extends AbstractJdbcRowConverter {
@Override
public String converterName() {
return DatabaseIdentifier.HIVE;
}
@Override
public PreparedStatement toExternal(
TableSchema tableSchema,
@Nullable TableSchema databaseTableSchema,
SeaTunnelRow row,
PreparedStatement statement) {
throw new JdbcConnectorException(
JdbcConnectorErrorCode.DONT_SUPPORT_SINK,
"The Hive jdbc connector don't support sink");
}
}
View on GitHub (pinned to cf67b549a7)
Solutions
- Use Hive as a Source only; pick a different sink (e.g. HDFS/File connector or a JDBC dialect that supports writes).
- If writing to a Hive-backed store is required, write to the underlying table via a supported sink connector instead of the Hive JDBC dialect.
- Check dialect capability before configuring pipelines (Hive dialect sink is intentionally unsupported).
Example fix
// before
sink { plugin_name = "Jdbc", url = "jdbc:hive2://host:10000/db", ... }
// after
source { plugin_name = "Jdbc", url = "jdbc:hive2://host:10000/db", ... }
sink { plugin_name = "HdfsFile", ... } Defensive patterns
Strategy: validation
Validate before calling
if (dialect instanceof HiveDialect && isSink) { throw new IllegalArgumentException("Hive jdbc cannot be used as a sink; use Source only"); } Type guard
boolean supportsSink(JdbcDialect d) { return !(d instanceof HiveDialect); } Try / catch
try { sink.write(row); } catch (JdbcConnectorException e) { if (e.getErrorCode() == JdbcConnectorErrorCode.DONT_SUPPORT_SINK) { /* reconfigure pipeline to use a writable sink */ } else throw e; } Prevention
- Use Hive only as a source; choose HDFS/File or other sinks for writes
- Check dialect capability matrix before designing pipelines
- Validate pipeline DAG in CI to catch sink misuse early
When it happens
Trigger: Configuring Hive (jdbc:hive2:) as a SeaTunnel Sink so the row converter's toExternal(PreparedStatement) is invoked during writing.
Common situations: Users assume Hive supports INSERT via JDBC the same way as MySQL/Postgres and configure it as a sink; generic JDBC sink templates applied to Hive URLs.
Related errors
- ILLEGAL_ARGUMENT
- JdbcConnectorErrorCode.DONT_SUPPORT_SINK
- Unsupported data format type:
- CONNECT_FAILED
- CREATE_HIVE_TABLE_FAILED
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/2f01bd4186897ec0.
Report an issue: GitHub.