graph

bulk_insert

Bulk-load nodes and edges in chunks.

strata graph bulk-insert

wire graph_bulk_insert

Ingests a payload of nodes and edges in chunked commits: nodes first, then edges, so edges may reference nodes from the same payload. Node objects use the key `node_id`; edges use `src`, `edge_type`, `dst`, and optional `weight` (default 1.0) and `properties`. `chunk_size` bounds items per commit (default 512, clamped at 800). The acknowledgement reports inserted counts, the number of chunk commits, and the final chunk's commit receipt.

Successful mutations return an acknowledgement of the outcome: for a state-changing write, the affected target with the mutation effect and commit facts; for mutations that produce a domain result (such as a branch or a promotion outcome), that result object.

To see the complete help for this command, run:

strata graph bulk-insert --help

Example

Insert many nodes and edges in one commit.

strata graph create gstrata command run --command-json '{"edges":[{"dst":"b","edge_type":"knows","src":"a"}],"graph":"g","nodes":[{"node_id":"a","object_type":"person"},{"node_id":"b","object_type":"person"}],"type":"graph_bulk_insert"}'strata graph meta g

Parameters

NameTypeRequiredDescription
graphstringyesGraph name.
branchstring or nullnoTarget branch. Defaults to the executor handle branch.
chunk_sizeinteger or nullnoOptional items-per-commit chunk size. Defaults to 512; values above 800 clamp so one chunk fits one storage commit.
edgesarraynoEdges to upsert; endpoints must exist or arrive in `nodes`.
nodesarraynoNodes to upsert (committed before edges).
spacestring or nullnoTarget product space. Defaults to `"default"`.

Returns

MutationAck<GraphBulkInsert>

  • dataobject
  • typestring

Errors

Recover by code. Retry policy and commit outcome come from the shipped error registry.

← All 31 Graph commands

agents: this page as markdown → /docs/reference/graph/bulk_insert.md