SDB

The SDB download has a number of command line tools: they all expect the environment variables SDBROOT to be set to the location of the SDB installation.

sdbquery SPEC --query=FILE

Execute a query.

sdbprint SPEC --print=X [--sql] --query=FILE

Print details of a query. "X" is any of "query", "prefix", "op", "sqlNode", "sql". --print=X can be repeated.  --sql is short for --print=sql.

sdbformat SPEC DBNAME

Format a database.  Deletes all existing data. DBNAME must be specified.

sdbload SPEC FILE [FILE ...]

Load RDF data into a store. File extension used to determine the data syntax. Uses the bulk loader.  Data is streamed into the database and is not loaded as a single transaction.

sdbdump SPEC --out=SYNTAX

Dump the contents of a store N-TRIPLES or a given serialization format (usual Jena syntax names, e.g. "Turtle" or "TTL").

sdbtruncate SPEC

Truncate the store.  Non-transactional.  Destroys data.

sdbtest SPEC MANIFEST

Execute a test manifest file.

sdbsql SPEC [ --file=FILE | SQL string ]

Execute a SQL command on the store, using the connection details from the store specification.

sdbscript SPEC

Execute a script (JRuby).

sdbinfo SPEC --out=SYNTAX

Details of a store.

sdbmeta SPEC --out=SYNTAX

Do things with the meta graphs of a store.

Set up

Set the environment variable to the root of the the SDB installation.

Set the environment variables SDB_USER and SDB_PASSWORD to the database user name and password for JDBC.

The directory bin/ contains shell scripts to run this command. The directory bin2/ contains scripts that can be placed on your PATH to call the scripts in bin/ without needing bin/ on the path.

Argument Structure

All commands take a SDB store description to extract the connection and configuration information they need.

Arguments:

If not specified, commands load the description file sdb.ttl from the current directory, or, failing that from the directory named in SDBROOT.

The individual components of a connection or configuration can be overridden after the description have been read, before it is processed:

SDB configuration:

JDBC parameters:

User and password are taken from environment variables SDB_USER and SDB_PASSWORD if not set in the description or command line.

All commands support --help to give details of other named and positional arguments.

--arg=val can also be written --arq val

SDB Documentation Page