Introduction
jdbc-milvus is an independent JDBC driver. Access Milvus with SQL-style commands for data reads and writes, vector searches, collection management and import jobs. Use Connection, PreparedStatement and ResultSet directly; dbVisitor APIs are optional.
Features
- Manage collections, indexes, partitions, aliases and access permissions.
- Use parameterized reads and writes, generated keys, paged reads and vector searches.
- Use Hybrid Search, reranking, BM25 and Import tasks, subject to server version and configuration requirements.
- Connect with TLS, mutual certificate authentication or Zilliz Cloud credentials.
Metadata Queries
Query through connection.getMetaData():
| JDBC method | Result |
|---|---|
getCatalogs() | The connected database |
getTables() | Collections in the current database |
getColumns() | Fields declared in the collection schema |
getSchemas() | Empty result |
getTableTypes() | TABLE |
Get Connected
- Add dependencies: Maven or Gradle configuration.
- Connect to the database: JDBC URL, credentials and connection examples.
- Configure parameters: names, defaults and units.
- Execute Commands: JDBC calls, paged writes and execution controls.
- Parameter Binding: Bind scalar, vector and array parameters.
- Read Results: Read result sets, update counts and multiple results.
- Usage limitations: JDBC support and database-specific restrictions.
Before You Connect
- Commands must use the syntax supported by this driver; arbitrary relational SQL is not translated.
- JDBC batch and transactions are not supported. Check the shared JDBC limitations before integrating a connection pool, ORM or other JDBC tool.
- Requires Milvus 2.6.2 or later within the documented support range; some features require newer versions. See Versions and Supported Scope. For TLS/mTLS and Zilliz Cloud, use the secure connection examples.