tigergraph__load_vectors_from_csv
Bulk-load vectors from a CSV/delimited file into a vertex type's vector attribute by creating, running, and dropping a GSQL loading job.
Instructions
Bulk-load vectors from a CSV/delimited file into a vertex type's vector attribute. Creates a GSQL loading job, runs it with the file, then drops the job.
File format: Each row has a vertex ID and a vector. Fields are separated by field_separator (default |). Vector elements are separated by element_separator (default ,).
Example file (field_separator='|', element_separator=','):
vertex1|0.1,0.2,0.3
vertex2|0.4,0.5,0.6Prerequisites:
Vertex type must already exist
Vector attribute must already be added (use 'add_vector_attribute')
File must exist on the local machine (it is uploaded to TigerGraph via REST)
Related Tools: add_vector_attribute, load_vectors_from_json (JSON Lines alternative), upsert_vectors (REST API for in-memory data), get_vector_index_status (check indexing after load)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| header | No | Whether the file has a header row. Default: false. | |
| profile | No | Connection profile name. Omit to use the active default profile. Use 'list_connections' to see available profiles. | |
| file_path | Yes | Absolute path to the CSV/delimited data file on the local machine (uploaded to TigerGraph via REST). Each row has a vertex ID and a vector column. | |
| id_column | No | Column for vertex ID: integer index (0-based) or header name. Default: 0 (first column). | |
| graph_name | No | Name of the graph. If not provided, uses default connection. | |
| vertex_type | Yes | Target vertex type that has the vector attribute. | |
| vector_column | No | Column containing the vector data: integer index (0-based) or header name. Default: 1 (second column). | |
| field_separator | No | Separator between fields (columns) in the file. Default: '|'. | | |
| vector_attribute | Yes | Name of the vector attribute to load into. | |
| element_separator | No | Separator between vector elements within the vector column. Default: ','. | , |