Scripts to Bulk Load RDF files into Virtuoso
Virtuoso Image: tenforce/virtuoso
version: '3'
services:
virtuoso:
container_name: virtuoso
image: tenforce/virtuoso:latest
volumes:
- ./data:/data
- ./scripts:/scripts
- ./logs:/logs
ports:
- 8890:8890
environment:
DBA_PASSWORD: "<dba_pswd>"
Usage sparql [sparql_cmd] [log_file] [virtuoso_dba_password]
docker exec -it virtuoso bash -c "cd /scripts && ./sparql 'CLEAR GRAPH <http://ocean-data.org/schema/> LOAD <http://ocean-data.org/schema/rdf.owl> INTO GRAPH <http://ocean-data.org/schema/>' /logs/sparql.log/ <dba_pswd>
THe command above clears a graph and then loads RDF into a graph using SPARQL
Usage: vload [virtuososo_allowed_directory] [data_file] [graph_uri] [log_file] [virtuoso_dba_password]
docker exec -it virtuoso bash -c "cd /scripts && ./vload VAD dataset.rdf http://test-vad /logs/vload.log <dba_pswd>"
The command above assumes:
- this script repository is mounted into the container at:
/scripts
- the directory 'VAD' is located in the container's '/data' directory
- the 'dataset.rdf' file is located in '/data/VAD' directory
- there is a '/logs' directory in the container for creating the log files
docker exec -it virtuoso bash -c "cd /scripts && ./vdelete http://test-vad /logs/vdelete <dba_pswd>"