-
-
Notifications
You must be signed in to change notification settings - Fork 111
Description
Describe the bug
ReplicaDB doest not work with DuckDB https://duckdb.org/.
To Reproduce
Steps to reproduce the behaviour:
- Add DuckDB jdbc jar file to class path.
- Set driver in options file:
source.connect.parameter.driver=org.duckdb.DuckDBDriver
When running, the following error occurs:
2025-11-15 19:48:58,425 ERROR ReplicaTask:45 ERROR in TaskId-0 getting Source connection: Invalid Input Error: The following options were not recognized: driver
2025-11-15 19:48:58,426 ERROR ReplicaDB:171 Got exception running ReplicaDB:
java.util.concurrent.ExecutionException: java.sql.SQLException: Invalid Input Error: The following options were not recognized: driver
Expected behavior
The connection should work normally without errors.
Additional context
The problem is that the parameter source.connect.parameter.driver is being used in two different ways:
- To determine the Java driver class.
- The same parameter is also passed as a connection property when creating the database connection.
DuckDB does not allow unrecognized connection parameters, so it fails when driver is passed to it.
Possible solution:
- Modify makeSourceConnection and makeSinkConnection in SqlManager.java to filter out the driver parameter after building the props object. Example: call props.remove("driver") after props.putAll(connectionParams).
- Introduce a new parameter (e.g., source.connect.driver) specifically for defining the JDBC driver class, so it does not get mixed with connection parameters.