DeciSym Engine (de) is a command-line tool for creating, querying, and inspecting RDF data in the HDT (Header, Dictionary, Triples) format. It enables efficient semantic data workflows using SPARQL and supports a variety of RDF and result serialization formats.
- Convert RDF data into compact, indexed
.hdtfiles - Query RDF and HDT files using SPARQL
- View metadata and statistics for HDT files
- Supports multiple output formats including CSV, JSON, Turtle, and more
- Simple CLI interface with verbosity control
- Download the latest release version and install the .deb
apt install de_${VERSION}_amd64.deb -y- Run with Docker:
docker run --rm decisym/de:latest --help- Build from source (requires Rust and Cargo):
git clone https://github.com/DeciSym/de.git
cd de
cargo build --release- COMING SOON Install the CLI with
cargo install
cargo install deAvailable commands:
create– Convert RDF data into an HDT filequery– Execute SPARQL queries on HDT/RDF dataview– View metadata and statistics for an HDT filehelp– Show command-specific help
Convert RDF data into a .hdt file.
de create --output-name data.hdt --data example.ttl-o, --output-name <OUTPUT_NAME>: Name of the output HDT file (should end in.hdt) [required]-d, --data <DATA>: One or more RDF source files (e.g.,.ttl,.nt) to include in the HDT-v, --verbose: Increase verbosity-q, --quiet: Suppress output-h, --help: Show help
Execute a SPARQL query over RDF and/or HDT files.
de query --data data.hdt --sparql query.rq --output json-
-d, --data <DATA>: One or more RDF or HDT files to query -
-s, --sparql <SPARQL>: Path to SPARQL query file (.rq) [required] -
-o, --output <OUTPUT>: Output format for results (default:csv)Supported formats:
csv,tsv: SPARQL CSV/TSVjson: SPARQL Results JSONxml: SPARQL Results XMLn3: Notation3nquads: N-Quadsrdfxml: RDF/XMLntriple: N-Triplestrig: TriGturtle: Turtle
-
-v, --verbose: Increase verbosity -
-q, --quiet: Suppress output -
-h, --help: Show help
de create --output-name apple.hdt --data apple.ttl
de query --data apple.hdt --sparql query-color.rq
fruit,color
http://example.org/Apple,Redex apple.ttl:
@prefix ex: <http://example.org/>.
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
ex:Apple rdf:type ex:Fruit;
rdfs:label "Apple";
ex:variety "Red Delicious";
ex:hasColor "Red";
ex:weight "150 grams";
ex:origin "United States";
ex:isOrganic true.
ex:Fruit rdf:type rdfs:Class;
rdfs:label "Fruit".
ex query-color.rq:
PREFIX ex: <http://example.org/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
SELECT ?fruit ?color
WHERE {
?fruit ex:hasColor ?color
}
ORDER BY DESC(?fruit)
Print metadata and statistics about an HDT file.
de view --data data.hdt-d, --data <DATA>: One or more HDT files-v, --verbose: Increase verbosity-q, --quiet: Suppress output-h, --help: Show help
This project is licensed under the BSD 3-Clause License - see the LICENSE file for details.