Skip to content

Latest commit

Β 

History

History
59 lines (44 loc) Β· 1.94 KB

File metadata and controls

59 lines (44 loc) Β· 1.94 KB

SETLr Documentation

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