SkillAgentSearch skills...

RDFConverter

Transform your data into semantic, machine-readable knowledge graphs - no coding required.

Install / Use

/learn @Mat-O-Lab/RDFConverter

README

RDFConverter

Publish Docker image TestExamples DOI

Transform your data into semantic, machine-readable knowledge graphs - no coding required.

🌐 Demo: http://rdfconverter.matolab.org/

Keywords: RDF, YARRRML, RML, knowledge graph, semantic web, data transformation, FAIR data, Catena-X, SAMM, CSVW, ontology, linked data, JSON-LD, materials science, automotive, REST API


Why RDFConverter?

RDFConverter bridges the gap between raw data (JSON, CSV, RDF) and standardized semantic ontologies using declarative YARRRML mappings. Whether you're publishing FAIR research data, integrating legacy systems, or implementing industry standards like Catena-X, RDFConverter makes semantic data transformation simple and maintainable.

Key Benefits

  • Declarative Mappings - Use human-readable YARRRML instead of imperative code
  • Template-Based - Reuse semantic method templates across datasets
  • Industry Standards - Built-in support for CSVW, SAMM, PROV-O
  • Multi-Format - JSON, CSV, RDF/Turtle, JSON-LD - all work seamlessly
  • Validation Built-In - SHACL shapes ensure data quality
  • Production-Ready - RESTful API, Docker deployment, CI/CD tested
  • Provenance Tracking - Automatic PROV-O metadata generation

What Makes RDFConverter Different?

RDFConverter doesn't reinvent YARRRML or RML - it packages the official tools (yarrrml-parser, rmlmapper-java) into a production-ready containerized service with a REST API.

✅ With RDFConverter:

  • docker compose up - Done! No dependency installation needed
  • Call from any language via REST API (Python, R, JavaScript, curl, etc.)
  • Pre-configured for production (logging, error handling, provenance)
  • Built-in testing and validation endpoints
  • Works on any OS (Linux, Mac, Windows)

📦 Without RDFConverter (Manual Setup):

  • Install Node.js for yarrrml-parser
  • Install Java for RML Mapper
  • Configure both tools separately
  • Write glue code to connect them
  • Handle errors and edge cases yourself
  • Set up logging and monitoring

For full YARRRML/RML capabilities, see:


Quick Start

Prerequisites

  • Docker and Docker Compose installed and running
  • Ports 3001, 4000, and 6003 available

5-Minute Setup

# 1. Clone the repository
git clone https://github.com/Mat-O-Lab/RDFConverter.git
cd RDFConverter

# 2. Create configuration
cat > .env << EOF
PARSER_PORT=3001
MAPPER_PORT=4000
APP_PORT=6003
CONVERTER_PORT=5000
YARRRML_URL=http://yarrrml-parser:3001
MAPPER_URL=http://rmlmapper:4000
APP_MODE=development
SSL_VERIFY=True
EOF

# 3. Launch services
docker compose -f docker-compose.develop.yml up -d

# 4. Wait for services to start (30 seconds)
sleep 30

# 5. Access the application
# Web UI: http://localhost:6003/
# API docs: http://localhost:6003/api/docs

Your First Mapping (2 Minutes)

Test the example CSVW mapping that transforms tensile test data:

curl -X POST http://localhost:6003/api/createrdf \
  -H "Content-Type: application/json" \
  -d '{"mapping_url":"https://github.com/Mat-O-Lab/RDFConverter/raw/main/examples/csvw-template-map.yaml"}'

You'll get back a JSON response with:

  • graph: The generated RDF/Turtle output
  • num_mappings_applied: Number of successful mapping rules
  • num_mappings_skipped: Rules that didn't match data

Real-World Use Cases

Use Case 1: Materials Testing Laboratory

Challenge: Laboratory generates CSV data from tensile testing machines. Data needs to be FAIR (Findable, Accessible, Interoperable, Reusable) and comply with DIN EN ISO 527-3 standard.

Solution: Use csvw-template-map.yaml to map CSV data to the MSEO (Materials Science and Engineering Ontology) using a standardized method template.

Result:

  • Raw CSV becomes semantic RDF
  • Data structured according to ISO standard
  • Template ensures consistency across all tests
  • Other researchers can understand and reuse the data

📁 See: examples/csvw-template-map.yaml


Use Case 2: Automotive Supply Chain (Catena-X)

Challenge: Automotive partners in the Catena-X data space need to exchange batch manufacturing data in a standardized, interoperable format.

Solution: Use catenax-batch-map.yaml to transform JSON batch payloads into SAMM (Semantic Aspect Meta Model) compliant RDF that references the official io.catenax.batch:3.0.1 specification.

Result:

  • JSON payloads become semantic documents
  • Full compliance with Catena-X standards
  • Traceability across supply chain partners
  • Automated validation against SAMM models

📁 See: examples/catenax-batch-map.yaml


Use Case 3: Your Use Case

Have JSON/CSV/RDF data that needs semantic structure?

  1. Identify your data source format
  2. Find or create an ontology/template
  3. Write a YARRRML mapping (see examples)
  4. Test with RDFConverter
  5. Deploy and share!

Comparison: Different Approaches

| Approach | Setup Time | Use Case | Best For | |----------|------------|----------|----------| | RDFConverter | 5 minutes | Reusable workflows, teams, production | Declarative mappings + REST API | | SPARQL CONSTRUCT | Immediate | One-off transformations | Already know SPARQL, simple transforms | | Custom Scripts | Varies | Complex custom logic | Unique requirements, performance critical | | GUI Tools (e.g., OntoRefine) | Minutes | Visual mapping | Non-developers, exploratory work |

Note: All approaches have their place. RDFConverter excels when you need maintainable, version-controlled mappings exposed via API.


Frequently Asked Questions

Q: What transformations can RDFConverter handle? A: Any transformation supported by YARRRML/RML, including:

  • CSV/JSON/XML to RDF
  • RDF to RDF (vocabulary transformation)
  • Complex joins and conditions
  • Nested data structures
  • Functions and data manipulation

Q: Can I transform between different RDF vocabularies? A: Yes! Use RDF as your data source in YARRRML mappings to map from one vocabulary to another (e.g., Dublin Core → Schema.org). See RML.io examples for RDF source handling.

Q: Does my data leave my server? A: No. All processing is local. RDFConverter only fetches URLs you provide in mappings.

Q: Can I use this in air-gapped/offline environments? A: Yes, once Docker images are pulled. No internet required for processing.

Q: How do I learn YARRRML syntax? A: See YARRRML Tutorial and try YARRRML Matey online editor.

Q: What about performance for large datasets? A: Performance depends on the underlying RML Mapper (Java). For specifics, see RML Mapper documentation.

Q: Can I integrate this into my Python/R/Node.js workflow? A: Yes! Use the REST API from any language that can make HTTP requests. See examples in the API Reference section.


How It Works

RDFConverter uses a simple 3-step process:

┌─────────────────────────────────────┐
│  1. Define Mapping (YARRRML)        │
│  - Specify data sources             │
│  - Define transformation rules      │
│  - Optional: reference templates    │
└─────────────────┬───────────────────┘
                  ↓
┌─────────────────────────────────────┐
│  2. RDFConverter Processes          │
│  - Converts YARRRML → RML           │
│  - Applies rules to your data       │
│  - Merges with templates (optional) │
│  - Validates output (optional)      │
└─────────────────┬───────────────────┘
                  ↓
┌─────────────────────────────────────┐
│  3. Get Semantic RDF                │
│  - Structured knowledge graph       │
│  - Validated against schemas        │
│  - Provenance metadata included     │
└─────────────────────────────────────┘

Supported Data Formats

Native RML Reference Formulations

RDFConverter supports all standard RML reference formulations as defined in the RML specification:

| Format | MIME Type | Reference Formulation | Iterator Syntax | Example | |--------|-----------|----------------------|-----------------|---------| | CSV | text/plain | csv | N/A (column names) | $(columnName) | | JSON | application/json | jsonpath | $.path.to[*].data | $..items[*] | | XML | application/xml | xpath | /path/to/element | //book[@id] | | XML | application/xml | xquery | XQuery expressions | for $x in ... |

Enhanced RDF Support 🎯

RDFConverter automatically converts RDF formats to JSON-LD, enabling JSONPath-based mappings on semantic data sources. This is a key differentiator that allows you to use existing RDF/Turtle data with the powerful JSONPath iterator syntax.

| Input Format | File Extension | Conversion | Use With | |--------------|----------------|------------|----------| | Turtle | .ttl | → JSON-LD | referenceFormulation: jsonpath | | RDF/XML | .rdf, .owl | → JSON-LD | referenceFormulation: jsonpath | | N-Triples | .nt | → JSON-LD | referenceFormulation: jsonpath | | N3 | .n3 | → JSON-LD | referenceFormulation: jsonpath | | JSON-LD | .jsonld | Preserved | `referenceFormulation

Related Skills

View on GitHub
GitHub Stars7
CategoryDevelopment
Updated18d ago
Forks0

Languages

Python

Security Score

90/100

Audited on Mar 18, 2026

No findings