DataWorks supports two connection modes for Milvus data sources: Instance mode for Alibaba Cloud-managed Milvus instances, and Connection string mode for self-managed or third-party Milvus endpoints.
Data source type:
milvus`ConnectionPropertiesMode` values:
InstanceMode|UrlMode
Prerequisites
Before you begin, ensure that you have:
The connection mode that applies to your setup (instance mode or connection string mode)
For instance mode: the instance ID and region ID of your Alibaba Cloud Milvus instance
For connection string mode: the endpoint URL of your Milvus instance
A username and password for the Milvus instance
Instance mode
Use instance mode when your Milvus instance is hosted on Alibaba Cloud. DataWorks looks up the instance using its ID and region, so no endpoint URL is needed.
| Parameter | Type | Required | Example | Description |
|---|---|---|---|---|
ConnectionPropertiesMode | String | Yes | InstanceMode | The connection mode. Set to InstanceMode for instance mode. |
regionId | String | Yes | cn-shanghai | The ID of the region where the instance resides. |
instanceId | String | Yes | c-dd8f**** | The instance ID. |
database | String | No | default | The name of the database. |
username | String | Yes | root | The username. |
password | String | Yes | xxxxx | The password. |
envType | String | Yes | Prod | The environment type. Valid values: Dev (development environment), Prod (production environment). |
Configuration example
{
"envType": "Prod",
"regionId": "cn-beijing",
"instanceId": "c-dd8f71372xxxx",
"database": "default",
"username": "root",
"password": "xxxxxxx"
}Connection string mode
Use connection string mode when connecting to a self-managed Milvus cluster or a third-party Milvus endpoint. Provide the full endpoint URL directly.
| Parameter | Type | Required | Example | Description |
|---|---|---|---|---|
ConnectionPropertiesMode | String | Yes | UrlMode | The connection mode. Set to UrlMode for connection string mode. |
endpoint | String | Yes | http://cmilvusxxxx.com:19530 | The endpoint URL of the Milvus instance. |
database | String | No | default | The name of the database. |
username | String | Yes | root | The username. |
password | String | Yes | xxxxx | The password. |
authType | String | Yes | USERNAME_PASSWORD | The authentication method. Set to USERNAME_PASSWORD when using username and password authentication. |
envType | String | Yes | Prod | The environment type. Valid values: Dev (development environment), Prod (production environment). |
Configuration example
{
"envType": "Prod",
"endpoint": "http://c-dd8xxxxx.milvus.aliyuncs.com:19530",
"database": "default",
"username": "root",
"password": "xxxx",
"authType": "USERNAME_PASSWORD"
}