JDBC Adapter¶
Available for: Java
The JDBC Adapter provides access to any database with a JDBC driver.
Installation¶
Add a dependency on org.apache.arrow.adbc:adbc-driver-flight-sql
.
For Maven users:
<dependency>
<groupId>org.apache.arrow.adbc</groupId>
<artifactId>adbc-driver-jdbc</artifactId>
</dependency>
Usage¶
To connect to a database, supply the JDBC URI as the “uri” parameter,
or an instance of a javax.sql.DataSource
as the
“adbc.jdbc.datasource” parameter.
final Map<String, Object> parameters = new HashMap<>();
parameters.put(AdbcDriver.PARAM_URL, "jdbc:postgresql://localhost:5432/postgres");
AdbcDatabase db = new JdbcDriver(allocator).open(parameters);
Supported Features¶
The Flight SQL driver generally supports features defined in the ADBC API specification 1.0.0.