Skip to main content

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 methodResult
getCatalogs()The connected database
getTables()Collections in the current database
getColumns()Fields declared in the collection schema
getSchemas()Empty result
getTableTypes()TABLE

Get Connected​

  1. Add dependencies: Maven or Gradle configuration.
  2. Connect to the database: JDBC URL, credentials and connection examples.
  3. Configure parameters: names, defaults and units.
  4. Execute Commands: JDBC calls, paged writes and execution controls.
  5. Parameter Binding: Bind scalar, vector and array parameters.
  6. Read Results: Read result sets, update counts and multiple results.
  7. 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.

Command reference · Query Operations · Data Writes