Loading Data
Legra supports loading RDF data from local files, directories, and remote HTTP sources.
Supported formats
| Format | Extension | MIME type |
|---|---|---|
| Turtle | .ttl | text/turtle |
| N-Triples | .nt | application/n-triples |
| RDF/XML | .rdf | application/rdf+xml |
Upload a single file
By default the triples are loaded into the default graph. To load into a named graph:
Upload a directory
When the path is a directory, Legra recursively loads all .ttl, .nt, and
.rdf files via HTTP PUT, replacing the target graph for each file:
Each file is loaded into a graph derived from the file path. Use --graph-base
to control the IRI prefix:
With the default --graph-base file://, a file at ./data/people.ttl is loaded
into file://data/people.ttl.
Target a specific branch or workspace
Upload accepts --workspace; --target-branch controls the final merge target:
Target a remote server
By default, legra graph upload connects to the local node. Override the node target
with the global connection flags:
Verifying loaded data
After loading, run a count query to verify:
Or list the named graphs: