Loading Data
WWKG 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 |
Load a single file
By default the triples are loaded into the default graph. To load into a named graph:
Load a directory
When the path is a directory, WWKG 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.
Import via HTTP
For N-Triples files, the import subcommand streams data to a running server:
Target a specific branch or workspace
All load commands accept --branch and --workspace:
Target a remote server
By default, wwkg load connects to http://127.0.0.1:4242. Override with
--server:
Verifying loaded data
After loading, run a count query to verify:
Or list the named graphs: