You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| field_name | String | Yes*| Target field name in Milvus collection. |
67
+
| source_field_name | String | Yes*| Source field name. If both are provided, `field_name` is the target name. |
68
+
| data_type | Integer | Yes | Milvus data type code (e.g. Int64=5, VarChar=21, FloatVector=101, Timestamptz=26). |
69
+
| is_primary_key | Boolean | No | Mark as primary key. |
70
+
| auto_id | Boolean | No | Enable auto ID for primary key. |
71
+
| dimension | Integer | No | Required for vector types. |
72
+
| max_length | Integer | No | Max length for VarChar fields. |
73
+
| element_type | Integer | No | Element type for Array fields. |
74
+
| max_capacity | Integer | No | Max capacity for Array fields. Default: 4096. |
75
+
| is_nullable | Boolean | No | Whether the field is nullable. |
76
+
| is_partition_key | Boolean | No | Mark as partition key. |
77
+
| timezone | String | No | IANA timezone ID (e.g. `Asia/Shanghai`, `US/Eastern`) or UTC offset (e.g. `+08:00`) for interpreting tz-naive source timestamps when writing to Milvus Timestamptz fields. If not set, falls back to JVM default timezone. See usage guidance below. |
78
+
79
+
\* At least one of `field_name` or `source_field_name` is required.
80
+
81
+
### When to use the `timezone` property
82
+
83
+
The `timezone` property is only needed when the **source value does not carry timezone information**. If the source value already has a timezone, do not configure it — the existing conversion handles it correctly.
84
+
85
+
| Source type | Example | Has timezone? | Configure `timezone`? |
86
+
|---|---|---|---|
87
+
| PostgreSQL `timestamp` (without tz) |`2024-01-02 08:00:00`| No |**Yes** — specify the intended timezone |
| MySQL `datetime`|`2024-01-02 08:00:00`| No |**Yes**|
90
+
| ES `date` (epoch_millis or with offset) |`1704153600000`| Yes |**No** — internally UTC |
91
+
| ES `date` (custom format without offset) |`2024-01-02 08:00:00`| No |**Yes**, only if ALL values in this field lack offset |
92
+
93
+
**Warning:** If a source field contains a mix of values with and without timezone information (e.g. Elasticsearch `date` with multiple formats), do not configure `timezone`. The existing systemDefault-based conversion handles the timezone-aware values correctly; adding a `timezone` override would cause double-conversion for those values.
Copy file name to clipboardExpand all lines: seatunnel-connectors-v2/connector-milvus/src/main/java/org/apache/seatunnel/connectors/seatunnel/milvus/sink/MilvusSinkFactory.java
Copy file name to clipboardExpand all lines: seatunnel-connectors-v2/connector-milvus/src/main/java/org/apache/seatunnel/connectors/seatunnel/milvus/sink/catalog/MilvusFieldSchema.java
+3Lines changed: 3 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -64,6 +64,9 @@ public class MilvusFieldSchema {
64
64
@SerializedName("enable_match")
65
65
privateBooleanenableMatch;
66
66
67
+
@SerializedName("timezone")
68
+
privateStringtimezone;
69
+
67
70
/**
68
71
* Get the effective field name (field_name if specified, otherwise source_field_name)
0 commit comments