8.10 ORARDFLDR Utility for Bulk Loading RDF Data
This section describes using the ORARDFLDR utility program for bulk loading
RDF data serialized in various standard formats such as RDF/XML
,
N-Triples
, Turtle
, JSON-LD
, and so
on.
The Java class oracle.rdf4j.adapter.utils.RDFLoader
is included with
Oracle Adapter for Eclipse RDF4J. It uses Eclipse RDF4J’s RDF parsers in combination
with Oracle Database’s scalable bulk loading capabilities to parse and load RDF files
into Oracle Database.
This utility program loads all files in a directory into an RDF graph in Oracle Database.
It supports several RDF serializations like RDF/XML
,
Turtle
, N-Triple
, N-Quads
,
Trig
, and JSON-LD
. Files compressed with
gzip
can be directly loaded without uncompressing the
gzip
file. In addition, Unicode characters, special characters, and
long literals (CLOB
s) are handled automatically.
Running ORARDFLDR Utility Program
The following describes the commands to execute ORARDFLDR. The commands
assume that all Oracle support for Eclipse RDF4J jars and required supporting jars
are located in /tmp/oracle_adapter/jar
as explained previously in
Setup and Configuration for Using Oracle RDF Graph Adapter for Eclipse RDF4J.
- Usage:
java -cp /tmp/oracle_adapter/jar/'*' oracle.rdf4j.adapter.utils.RDFLoader <command_line_arguments>
- For help
details:
java -cp /tmp/oracle_adapter/jar/'*' oracle.rdf4j.adapter.utils.RDFLoader --help
For convenience, a shell script in the bin
directory can also be
executed. Proper set up of the CLASSPATH
environment variable is
required for execution of this shell script. The following describes the
prerequisites and the commands to use this script:
Prerequisite: Set the CLASSPATH
environment variable and
ensure the /bin
directory of the kit is in your Unix
PATH
environment variable.
- Setup (assuming C shell command line
interface):
export CLASSPATH=/tmp/oracle_adapter/jar/'*' export PATH=/tmp/oracle_adapter/bin:$PATH
- Usage:
orardfldr <command_line_arguments>
- For help details:
orardfldr --help
Parent topic: RDF Graph Support for Eclipse RDF4J