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
It is worth mentioning that vec, array, and json data types are stored in the form of json strings, especially vec and array types.
The vec and array types use json strings for storage and parsing, but do not support custom connectors, such as {1,2} or [1|2]. This is because special characters may appear in array[string], causing unexpected parsing errors in csv.
Migrate data from other databases to milvus
Import of csv data files exported from other databases (only tested postgresql with pg_vector) is supported. When exporting data from pg, its array type needs to be converted to a json string using the array_to_json method.
Convert array columns to json strings
CREATEVIEWmy_viewASSELECT
BoolColumn,
IntColumn,
FloatColumn,
StringColumn,
JsonColumn,
array_to_json(ArrayColumn) AS ArrayColumn
FROM my_table;
Export to a csv file
COPY my_view TO '/path/to/your/file.csv' WITH CSV HEADER;
CSV delimiter configuration
In addition, the delimiter of CSV supports configuration. The field name is sep. The delimiter only supports one unicode character. The RESTful API for creating an import task is as follows.
Perhaps we could implement a tool to convert CSV files into Parquet format and keep Milvus from supporting CSV import. This would help cut down on code maintenance costs. @tedxu@xiaofan-luan@OxalisCu
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Rotten issues close after 30d of inactivity. Reopen the issue with /reopen.
Is there an existing issue for this?
What would you like to be added?
Added csv file support in bulkinsert function.
Supported csv file formats
The first row is the data column name, the other rows are the data.
It is worth mentioning that vec, array, and json data types are stored in the form of json strings, especially vec and array types.
The vec and array types use json strings for storage and parsing, but do not support custom connectors, such as
{1,2}
or[1|2]
. This is because special characters may appear in array[string], causing unexpected parsing errors in csv.Migrate data from other databases to milvus
Import of csv data files exported from other databases (only tested postgresql with pg_vector) is supported. When exporting data from pg, its array type needs to be converted to a json string using the array_to_json method.
COPY my_view TO '/path/to/your/file.csv' WITH CSV HEADER;
CSV delimiter configuration
In addition, the delimiter of CSV supports configuration. The field name is
sep
. The delimiter only supports one unicode character. The RESTful API for creating an import task is as follows.curl --request POST "http://localhost:19530/v2/vectordb/jobs/import/create" \ --header "Content-Type: application/json" \ --data-raw '{ "files": [ [ "filepath" ] ], "collectionName": "collection_name", "options": {"sep": "\t"} }'
Why is this needed?
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: