arrow
export
Export a product primitive to an Arrow-compatible file.
strata arrow exportdb.arrow.export(primitive: 'str', path: 'str', *, format: 'str' = 'parquet', collection: 'Optional[str]' = None, event_type: 'Optional[str]' = None, graph: 'Optional[str]' = None, limit: 'Optional[int]' = None, prefix: 'Optional[str]' = None) -> 'Any'wire arrow_export
Exports a product primitive from the selected branch and space to an Arrow-compatible file (Parquet, CSV, or JSONL). Graph exports treat the path as a stem and write separate node and edge files. Returns a summary of the exported primitive, the concrete output paths, the row count, and the total output size.
Status commands return a scalar or compact status payload and do not mutate database state.
To see the complete help for this command, run:
strata arrow export --helphelp(db.arrow.export)
Example
Export a primitive to a Parquet file, then import it back.
strata kv put greeting hellostrata command run --command-json '{"format":"parquet","path":"/tmp/exports/kv.parquet","primitive":"kv","type":"arrow_export"}' # One file per primitive; Parquet by default.strata kv delete greetingstrata arrow import /tmp/exports/kv.parquet --target kvstrata kv get greeting
_ = db.kv.put("greeting", "hello")_ = db.arrow.export("kv", tmp_dir + "/kv.parquet", format="parquet") # One file per primitive; Parquet by default._ = db.kv.delete("greeting")_ = db.arrow.import_("kv", tmp_dir + "/kv.parquet")db.kv.get("greeting")
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| format | ArrowFileFormat | yes | Output file format.one of: parquet, csv, jsonl |
| path | string | yes | Output file path. Graph exports treat this as a stem and return concrete node and edge paths. |
| primitive | ArrowExportPrimitive | yes | Product primitive to export.one of: kv, json, event, vector, graph |
| branch | string or null | no | Target branch. Defaults to the executor handle branch. |
| collection | string or null | no | Target vector collection for vector exports. |
| event_type | string or null | no | Optional event type filter for event exports. |
| graph | string or null | no | Target graph for graph exports. |
| limit | integer or null | no | Optional row limit. |
| prefix | string or null | no | Optional key, document, vector-key, or node-id prefix. |
| space | string or null | no | Target product space. Defaults to `"default"`. |
Returns
StatusResponse<ArrowExport>
- dataArrowExportResult
- typestring
Errors
Recover by code. Retry policy and commit outcome come from the shipped error registry.
| Code | Retry | Commit outcome |
|---|---|---|
| failed_precondition.engine.runtime_closed | never | not_started |
| not_found.engine.branch | never | not_applicable |
| invalid_argument.engine.product_space | never | not_started |
| unsupported.executor.arrow_feature_disabled | after_state_change | not_started |
| invalid_argument.executor.arrow_format | never | not_started |
| invalid_argument.executor.arrow_empty_export | never | not_started |
| invalid_argument.executor.arrow_vector_dimension | never | not_started |
| invalid_argument.executor.arrow_graph | never | not_started |
| invalid_argument.executor.arrow_collection | never | not_started |
| unavailable.executor.arrow_io | after_state_change | not_applicable |
| internal.executor.arrow | unknown | not_applicable |