Bulk load of SQL table from RDF in Python
pip install rdf-sql-bulkloader
rdf-sql-bulkloader load-sqlite -o cl.db cl.owl
Note: currently only sqlite supported
See tests
CREATE TABLE statement (
id TEXT,
subject TEXT,
predicate TEXT,
object TEXT,
value TEXT,
datatype TEXT,
language TEXT,
graph TEXT
);
this uses the merged prefixmap from prefixmaps by default
This can be overridden programmatically when instantiating a loader, e.g
Explicit map:
loader = SqliteBulkloader(path=path, prefix_map={...})
Using pre-registered:
loader = SqliteBulkloader(path=path, named_prefix_maps=["obo", "prefixcc"])
- TODO: add override from CLI
This work was entirely inspired by James Overton's rdftab.rs
This cookiecutter project was developed from the sphintoxetry-cookiecutter template and will be kept up-to-date using cruft.