Skip to main content

rdf-sql-bulkloader

Project description

rdf-sql-bulkloader

Bulk load of SQL table from RDF in Python

Install

pip install rdf-sql-bulkloader

Usage (Command Line)

rdf-sql-bulkloader load-sqlite  -o cl.db cl.owl

Note: currently only sqlite supported

Usage (Programmatic)

See tests

Core table

CREATE TABLE statement (
	id TEXT,
	subject TEXT,
	predicate TEXT,
	object TEXT,
	value TEXT,
	datatype TEXT,
	language TEXT,
        graph TEXT
);

Prefixes

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

Acknowledgements

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rdf_sql_bulkloader-0.1.3.tar.gz (5.5 kB view hashes)

Uploaded Source

Built Distribution

rdf_sql_bulkloader-0.1.3-py3-none-any.whl (6.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page