tigergraph__load_vectors_from_json
Bulk-load vector embeddings from a JSON Lines file into a TigerGraph vertex attribute by creating and running a GSQL loading job.
Instructions
Bulk-load vectors from a JSON Lines (.jsonl) file into a vertex type's vector attribute. Creates a GSQL loading job with JSON_FILE="true", runs it with the file, then drops the job.
File format: Each line is a JSON object with an ID field and a vector field. The vector is stored as a comma-separated string (not a JSON array).
Example file (id_key='id', vector_key='embedding'):
{"id": "vertex1", "embedding": "0.1,0.2,0.3"}
{"id": "vertex2", "embedding": "0.4,0.5,0.6"}Prerequisites:
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_csv (CSV alternative), upsert_vectors (REST API for in-memory data), get_vector_index_status (check indexing after load)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id_key | No | JSON key for the vertex ID. Default: 'id'. | id |
| 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 JSON Lines (.jsonl) file on the local machine (uploaded to TigerGraph via REST). Each line is a JSON object with an ID field and a vector field. | |
| graph_name | No | Name of the graph. If not provided, uses default connection. | |
| vector_key | No | JSON key for the vector data (stored as a comma-separated string). Default: 'vector'. | vector |
| vertex_type | Yes | Target vertex type that has the vector attribute. | |
| vector_attribute | Yes | Name of the vector attribute to load into. | |
| element_separator | No | Separator between vector elements within the vector string value. Default: ','. | , |