# What Export Formats Does Semantica Support? A Complete Guide to Knowledge Graph Exports

> Explore Semantica's eight export formats including JSON CSV Neo4j CSV LPG ArangoDB YAML RDF Turtle and SHACL Discover how to export your knowledge graph data effectively.

- Repository: [Semantica /semantica](https://github.com/semantica-agi/semantica)
- Tags: api-reference
- Published: 2026-09-04

---

**Semantica supports eight distinct export formats—JSON, CSV, Neo4j CSV, LPG (Label-Property Graph), ArangoDB collections, YAML, RDF/Turtle, and SHACL—each implemented as modular Python classes under the `semantica/export/` package.**

The `semantica-agi/semantica` repository provides a flexible export subsystem for persisting knowledge-graph data to various storage backends and file formats. Located in the `semantica/export/` directory, this modular architecture allows developers to serialize entities and relationships using everything from simple flat files to semantic-web standards. Understanding the available export formats helps you integrate Semantica outputs with downstream analytics pipelines, graph databases, and validation frameworks.

## Overview of Supported Export Formats

Semantica’s export capabilities cover four categories: document formats, tabular dumps, graph-native representations, and semantic-web standards.

### Document and Tabular Formats

- **JSON** ([`semantica/export/json_exporter.py`](https://github.com/semantica-agi/semantica/blob/main/semantica/export/json_exporter.py)): Language-agnostic snapshots via the `JSONExporter` class. Ideal for API integrations and JavaScript-based frontends.

- **CSV** ([`semantica/export/csv_exporter.py`](https://github.com/semantica-agi/semantica/blob/main/semantica/export/csv_exporter.py)): Flat-table compatibility through the `CSVExporter` class for spreadsheet tools and bulk-load pipelines.

- **YAML** ([`semantica/export/yaml_exporter.py`](https://github.com/semantica-agi/semantica/blob/main/semantica/export/yaml_exporter.py)): Human-readable configuration-style dumps using the `YAMLExporter` class, suitable for version-controlled data repositories.

### Graph Database Formats

- **Neo4j CSV** ([`semantica/export/neo4j_csv_exporter.py`](https://github.com/semantica-agi/semantica/blob/main/semantica/export/neo4j_csv_exporter.py)): Generates `nodes.csv` and `relationships.csv` files compatible with Neo4j’s `LOAD CSV` commands via the `Neo4jCSVExporter` class.

- **LPG** ([`semantica/export/lpg_exporter.py`](https://github.com/semantica-agi/semantica/blob/main/semantica/export/lpg_exporter.py)): General-purpose Label-Property Graph format via the `LPGExporter` class, supported by many graph analytics engines.

- **ArangoDB** ([`semantica/export/arango_exporter.py`](https://github.com/semantica-agi/semantica/blob/main/semantica/export/arango_exporter.py)): Direct export to ArangoDB collections using the `ArangoExporter` class in a JSON-like document format.

### Semantic Web and Validation Formats

- **RDF/Turtle** ([`semantica/export/rdf_exporter.py`](https://github.com/semantica-agi/semantica/blob/main/semantica/export/rdf_exporter.py)): Standards-compliant RDF serialization via the `RDFExporter` class, enabling downstream SPARQL querying and linked-data publishing.

- **SHACL** ([`semantica/export/shacl_exporter.py`](https://github.com/semantica-agi/semantica/blob/main/semantica/export/shacl_exporter.py)): Shape constraint generation via the `SHACLExporter` class for validating RDF graph structures against defined schemas.

## How the Export Registry Works

The system uses a central registry pattern implemented in [`semantica/export/registry.py`](https://github.com/semantica-agi/semantica/blob/main/semantica/export/registry.py). This module maps **method names** (e.g., `"json"`, `"neo4j_csv"`, `"rdf"`) to their corresponding exporter classes. The user-facing API in [`semantica/export/methods.py`](https://github.com/semantica-agi/semantica/blob/main/semantica/export/methods.py) provides convenience functions that validate payload schemas—requiring a list of entity/relationship dictionaries—before delegating to the selected exporter.

## Practical Code Examples

### Export to JSON

```python
from semantica.export import methods as export

# payload is a list of dicts representing entities and relationships

export.export_json(payload, "data/export.json")

```

This invokes the `JSONExporter` class from [`semantica/export/json_exporter.py`](https://github.com/semantica-agi/semantica/blob/main/semantica/export/json_exporter.py), producing a language-agnostic snapshot of your knowledge graph.

### Export to Neo4j-Compatible CSV

```python
from semantica.export import methods as export

export.export_neo4j_csv(payload, "data/neo4j")

# Creates nodes.csv and relationships.csv in the specified directory

```

The `Neo4jCSVExporter` class in [`semantica/export/neo4j_csv_exporter.py`](https://github.com/semantica-agi/semantica/blob/main/semantica/export/neo4j_csv_exporter.py) handles the specific formatting requirements for Neo4j bulk imports, including proper header structures and relationship type columns.

### Export to RDF (Turtle)

```python
from semantica.export import methods as export

export.export_rdf(payload, "data/graph.ttl")

```

The `RDFExporter` class in [`semantica/export/rdf_exporter.py`](https://github.com/semantica-agi/semantica/blob/main/semantica/export/rdf_exporter.py) serializes the payload into Turtle format, making it compatible with semantic-web triple stores and SPARQL endpoints.

### Generate SHACL Validation Shapes

```python
from semantica.export import methods as export

export.export_shacl(payload, "data/shapes.ttl")

```

The `SHACLExporter` class in [`semantica/export/shacl_exporter.py`](https://github.com/semantica-agi/semantica/blob/main/semantica/export/shacl_exporter.py) generates constraint files that define validation rules for RDF graphs.

## Key Source Files in the Export Subsystem

Understanding the repository structure helps when customizing or debugging exports:

- [`semantica/export/registry.py`](https://github.com/semantica-agi/semantica/blob/main/semantica/export/registry.py): Central registry mapping method names to exporter classes.
- [`semantica/export/methods.py`](https://github.com/semantica-agi/semantica/blob/main/semantica/export/methods.py): High-level helper functions (`export_json`, `export_csv`, `export_neo4j_csv`, etc.).
- [`semantica/export/json_exporter.py`](https://github.com/semantica-agi/semantica/blob/main/semantica/export/json_exporter.py): Contains the `JSONExporter` implementation.
- [`semantica/export/csv_exporter.py`](https://github.com/semantica-agi/semantica/blob/main/semantica/export/csv_exporter.py): Implements the `CSVExporter` for flat-file output.
- [`semantica/export/neo4j_csv_exporter.py`](https://github.com/semantica-agi/semantica/blob/main/semantica/export/neo4j_csv_exporter.py): Houses the `Neo4jCSVExporter` for Neo4j-specific CSV generation.
- [`semantica/export/lpg_exporter.py`](https://github.com/semantica-agi/semantica/blob/main/semantica/export/lpg_exporter.py): Defines the `LPGExporter` for Label-Property Graph serialization.
- [`semantica/export/arango_exporter.py`](https://github.com/semantica-agi/semantica/blob/main/semantica/export/arango_exporter.py): Implements the `ArangoExporter` for direct ArangoDB integration.
- [`semantica/export/yaml_exporter.py`](https://github.com/semantica-agi/semantica/blob/main/semantica/export/yaml_exporter.py): Contains the `YAMLExporter` for human-readable dumps.
- [`semantica/export/rdf_exporter.py`](https://github.com/semantica-agi/semantica/blob/main/semantica/export/rdf_exporter.py): Implements the `RDFExporter` for semantic-web compliance.
- [`semantica/export/shacl_exporter.py`](https://github.com/semantica-agi/semantica/blob/main/semantica/export/shacl_exporter.py): Defines the `SHACLExporter` for validation shape generation.

## Summary

- Semantica provides **eight export formats** through modular exporters located in `semantica/export/`.
- The **registry pattern** in [`registry.py`](https://github.com/semantica-agi/semantica/blob/main/registry.py) decouples format implementation from the public API defined in [`methods.py`](https://github.com/semantica-agi/semantica/blob/main/methods.py).
- Formats range from simple **JSON/CSV** to specialized graph databases (**Neo4j, ArangoDB**) and semantic-web standards (**RDF, SHACL**).
- All exporters accept a standardized payload of entity/relationship dictionaries.
- Use `export_methods.export_<format>()` for one-line serialization to your target format.

## Frequently Asked Questions

### What is the difference between the CSV and Neo4j CSV exporters?

The standard `CSVExporter` in [`semantica/export/csv_exporter.py`](https://github.com/semantica-agi/semantica/blob/main/semantica/export/csv_exporter.py) produces flat tabular files suitable for spreadsheets and general data analysis. In contrast, `Neo4jCSVExporter` in [`semantica/export/neo4j_csv_exporter.py`](https://github.com/semantica-agi/semantica/blob/main/semantica/export/neo4j_csv_exporter.py) generates specifically formatted `nodes.csv` and `relationships.csv` files that comply with Neo4j’s `LOAD CSV` import requirements, including mandatory headers like `:ID`, `:LABEL`, `:TYPE`, and `:START_ID`/`:END_ID` columns.

### Can I export directly to an ArangoDB instance?

Yes. The `ArangoExporter` class in [`semantica/export/arango_exporter.py`](https://github.com/semantica-agi/semantica/blob/main/semantica/export/arango_exporter.py) supports direct export to ArangoDB collections using their native JSON-like document format. Unlike file-based exporters, this implementation can interface directly with the database API rather than producing intermediate files for manual import.

### How does the export registry validate payloads?

The registry in [`semantica/export/registry.py`](https://github.com/semantica-agi/semantica/blob/main/semantica/export/registry.py) ensures that incoming payloads conform to the expected schema—a list of dictionaries containing structured entity and relationship data—before instantiating the appropriate exporter class. This validation occurs within the helper functions defined in [`semantica/export/methods.py`](https://github.com/semantica-agi/semantica/blob/main/semantica/export/methods.py), preventing malformed data from reaching the serialization layer.

### Which export format should I use for SPARQL querying?

Use the **RDF/Turtle** format via `export_rdf()` or the `RDFExporter` class in [`semantica/export/rdf_exporter.py`](https://github.com/semantica-agi/semantica/blob/main/semantica/export/rdf_exporter.py). This produces standards-compliant RDF graphs that can be loaded into triple stores such as Apache Jena, GraphDB, or Virtuoso, enabling complex querying through the SPARQL protocol.