SETLr Documentation

January 19, 2026 ยท View on GitHub

Welcome to the SETLr (Semantic Extract, Transform and Load-er) documentation!

Table of Contents

  1. Quick Start
  2. Installation
  3. Tutorial
  4. JSLDT Template Language
  5. Python API
  6. Advanced Features
  7. Examples
  8. CLI Reference

What is SETLr?

SETLr is a powerful tool for generating RDF graphs from tabular data sources. It uses declarative SETL (Semantic Extract, Transform, Load) scripts to:

  • Extract data from CSV, Excel, JSON, XML, and RDF sources
  • Transform data using JSON-LD templates with Jinja2 templating
  • Load results to files or SPARQL endpoints

Key Features

  • ๐Ÿ“Š Multiple Data Formats: CSV, Excel, JSON, XML, RDF, SAS files
  • ๐Ÿ”„ Powerful Transformations: JSON-LD templates with @if, @for, @with control structures
  • ๐Ÿ Python Integration: Call from Python code or use custom Python functions
  • โšก Streaming: Efficient XML parsing for large files with XPath filtering
  • โœ… Validation: Built-in SHACL validation support
  • ๐ŸŽฏ SPARQL: Execute SPARQL queries and load to endpoints

Quick Example

from rdflib import Graph
import setlr

# Load your SETL script
setl_graph = Graph()
setl_graph.parse("my_script.setl.ttl", format="turtle")

# Execute the ETL pipeline
resources = setlr.run_setl(setl_graph)

# Access generated RDF
output_graph = resources[URIRef('http://example.com/output')]

Learn More