surreal-sync-json
Sync JSON Lines (JSONL) files into SurrealDB. Each file becomes a table; each line becomes a document.
Depend
= { = "0.6", = ["from_jsonl"] }
= "0.6" # SurrealDB 3 by default; use features = ["v2"] for v2
Embed
Define optional transforms, then call run with a SurrealDB sink. Pass the same flags as surreal-sync from jsonl (for example --path and --to-namespace / --to-database).
use Result;
use HashMap;
use ;
use Surreal3Sink;
;
async
Full working example: examples/from-jsonl.