Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.turingdb.ai/llms.txt

Use this file to discover all available pages before exploring further.

TuringDB natively imports JSONL files through the LOAD JSONL command. The expected format is compatible with Neo4j APOC’s JSON export (produced by apoc.export.json.all with useTypes:true).
If you are migrating from Neo4j, you do not need to write this file by hand — see the Neo4j import guide.

Expected file format

Each line is a self-contained JSON object representing either a node or a relationship:
{"type":"node","id":"0","labels":["Person"],"properties":{"name":"Alice","age":30}}
{"type":"node","id":"1","labels":["Person"],"properties":{"name":"Bob","age":25}}
{"type":"node","id":"2","labels":["Company"],"properties":{"name":"Acme Corp"}}
{"type":"relationship","id":"0","label":"KNOWS","start":{"id":"0"},"end":{"id":"1"},"properties":{"since":2021}}
{"type":"relationship","id":"1","label":"WORKS_AT","start":{"id":"0"},"end":{"id":"2"}}
Nodes ("type": "node"):
FieldRequirement
typeMust be the string "node"
idRequired. Integer or string parseable as integer. Must start at 0 and increment by 1 with no gaps.
labelsRequired. Array with at least one label.
propertiesOptional. Dictionary with property keys and values.
Relationships ("type": "relationship"):
FieldRequirement
typeMust be the string "relationship"
idRequired. Integer or string parseable as integer. Must start at 0 and increment by 1 with no gaps.
labelRequired. Exactly one label.
start / endRequired. Either:
- a bare integer (or string parseable as integer) referencing a node id
- a dictionary with an id key holding an integer (or string parseable as integer) referencing a node id.
propertiesOptional. Dictionary with property keys and values.

Import steps

1

Place your file in the TuringDB data directory

TuringDB only reads external files from the data subdirectory of its working directory (set by --turing-dir, default $HOME/.turing).
cp mydata.jsonl ~/.turing/data/
2

Load the file into a new graph

LOAD JSONL 'mydata.jsonl' AS mygraph
TuringDB creates a new graph named mygraph and populates it with all nodes and relationships from the file.
3

Set the graph as active and query it

cd mygraph

MATCH (n) RETURN n
Your JSONL data is now loaded and queryable as a TuringDB graph.

Verify the import

Use procedures to inspect what was imported:
CALL db.labels()
CALL db.edgeTypes()
CALL db.propertyTypes()