virtuoso-rdf-bulk-loader
Skill42 starsChanged 51 days agoMITView on GitHub
Generate and run Virtuoso isql bulk-load scripts for RDF directories. Takes a source folder plus optional graph IRI, file pattern/formats, and load mode (directory-wide via ld_dir + rdf_loader_run, or per-file named graphs via TTLP_MT with an auto prefix preamble), and emits a ready-to-run .sql. Use when bulk-loading RDF files from a folder into a Virtuoso quad store via isql, regenerating loader scripts after store changes, or simplifying repeated folder loads.
In this repository45 other files it gives its agents.
- agent-rdf-memory/AGENTS.mdAGENTS.md
- AGENTS.mdAGENTS.md
- a2a-clientSkill
- acp-clientSkill
- csv-to-rdf-det-generatorSkill
- data-twinglerSkill
- dbpedia-query-skillSkill
- document-to-kg-skillSkill
- fediverse-crudSkill
- fuxi-engineerSkill
- infographic-describerSkill
- iodbc-dsn-managerSkill
- kg-generatorSkill
- linked-data-skillsSkill
- llm-routing-skillSkill
- monidSkill
- mpp-stripe-clientSkill
- mtls-curlSkill
- opal-agent-skill-assemblerSkill
- openlink-license-managerSkill
- openlink-license-readerSkill
- openlink-request-broker-configuratorSkill
- opml-rss-readerSkill
- osdi-inclusion-engineSkill
- pinchtabSkill
- rdf-det-variant-generatorSkill
- rdf-infographic-skillSkill
- resource-access-offers-generatorSkill
- rss-feed-generatorSkill
- s3-query-skillSkill
- screencast-recorderSkill
- set-webdav-resource-propertySkill
- sparql-faceted-browserSkill
- ucp-clientSkill
- uriburner-opal-agent-skillsSkill
- virtuoso-rdf-loaderSkill
- virtuoso-support-agentSkill
- wc2026-match-reportSkill
- weblog-from-webdavSkill
- website-from-webdavSkill
- wikidata-query-skillSkill
- world-cup-2026-navigatorSkill
- x402-buyerSkill
- xmla-clientSkill
- youidSkill
The file
Files
Virtuoso RDF Bulk Loader — isql loader generation from a source folder
Generate a ready-to-run isql .sql from a local folder of RDF files. Two modes:
| Mode | Mechanism | Use for |
dir (default) | ld_dir + rdf_loader_run — one named graph for the whole folder; Virtuoso auto-detects format (N-Triples, Turtle, RDF/XML, N-Quads, TriG, JSON-LD, Notation3) and reads gzip/bzip2 natively | Simple bulk ingestion, mixed formats, compressed archives |
per-file | TTLP_MT — one named graph per file (Turtle family: .ttl, .nt, .trig), optional auto prefix-preamble and CLEAR-before-load | Exact per-document graphs (e.g. an agent memory store), re-loadable deltas |
Workflow
- Elicit (never guess): source folder (must be accessible to the Virtuoso server process —
ld_dirregisters server-side paths), target graph IRI (dir mode), file pattern or format list. - Generate:
python3 scripts/generate-bulk-load-sql.py \ --source-dir /path/to/rdf/ \ --graph https://example.com/my-graph \ --pattern '*.ttl' \ --out bulk-load.sql - Run (your credentials, never displayed):
isql 1111 dba <dba-password> -f bulk-load.sql - Monitor (the generated script ends with the load_list check):
select * from db.dba.load_list where ll_state <> 2;ll_state 2= done; rows remaining = still pending/errored (ll_errorcolumn). - Verify (generated script ends with per-graph counts):
SPARQL SELECT ?g (COUNT(*) AS ?t) WHERE { GRAPH ?g { ?s ?p ?o } } GROUP BY ?g;
Options (generate-bulk-load-sql.py)
| Flag | Default | Meaning |
--source-dir | (required) | Folder containing the RDF files (server-visible path) |
--graph | urn:dav:/DAV/home/kidehen/bulk-load/ | Target named graph (dir mode) |
--pattern | *.* | ld_dir pattern, e.g. *.ttl, *.nt.gz, *.nq |
--formats | — | Shorthand expanding to patterns, e.g. ttl,nt,nq |
--mode | dir | dir (ld_dir) or per-file (TTLP_MT per document) |
--graph-base | urn:dav:/DAV/home/kidehen/bulk-load/ | IRI prefix for per-file graphs (file relpath appended) |
--preamble | off | per-file mode: prepend store-wide prefix union so prefix-undeclared Turtle loads |
--clear | off | Emit SPARQL CLEAR GRAPH before loading (idempotent re-runs) |
--out | bulk-load.sql | Output path |
--dry-run | off | Print the script instead of writing |
Notes
- Server-side paths:
ld_dirpaths are read by the Virtuoso server, not your client. For a remote Virtuoso, stage files on the server first. - Idempotency:
ld_dirdoes not double-load identical files;rdf_loader_run()may be re-run safely.--clearmakes full re-runs replace the graph. - Troubleshooting: load failures, permission issues, DAV paths, and named-graph management — see the
virtuoso-rdf-loaderskill (ld_dir + rdf_loader_run deep-dive). - This skill is the generator generalization of the agent-rdf-memory loader (
agent-rdf-memory/scripts/generate-loader-sql.py); that store'srefresh-loader.shis the same pattern in action.
Safe Virtuoso ISQL Error Output
Whenever this workflow invokes OpenLink's native Virtuoso isql client, pass the bare client option COMMAND_TEXT_ON_ERROR=OFF, for example isql {host}:{port} {user} {password} COMMAND_TEXT_ON_ERROR=OFF {script.sql}. Place it before SQL input, script arguments, or -i. OFF maps to the client's internal value 0 and prevents the client from appending the full failed command to error output. The client accepts OFF/ON; literal 0 is rejected. Do not use -u for this setting (-u populates the U argument array). This does not redact secrets from server diagnostics, shell history, or process arguments, so keep credentials out of SQL text and logs. Do not apply this Virtuoso-specific option to unixODBC/iODBC isql clients.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

