Skip to content

arenas-guerrero-julian/pg2rml-star

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PG2RML-star

PG2RML-star bootstraps RML-star mappings from property graph databases that can then be customized by users with domain vocabularies. The mappings can then be used with an RML system such as Morph-KGC to generate the RDF-star knowledge graph. To facilitate mapping customization by users, PG2RML-star creates the mappings in YARRRML syntax, a user-friendly serialization of RML. PG2RML-star currently supports the following property graph databases:

Getting Started 🚀

Install

pip install git+https://github.com/arenas-guerrero-julian/pg2rml-star.git

Command line

usage: python3 -m pg2rml_star [-h] [-o OUTPUT_FILE_PATH] [-v] database_url_path

positional arguments:
  database_url_path     Neo4j url or path to Kuzu database

options:
  -h, --help            show this help message and exit
  -o OUTPUT_FILE_PATH, --output_file_path OUTPUT_FILE_PATH
                        File path to wire the output mappings (if not provided mappings will be redirected to stdout)

Neo4j example (modify the database URL accordingly):

python3 -m pg2rml_star neo4j://localhost:port@my_username:my_password/my_database

Kùzu example:

python3 -m pg2rml_star path/to/my_kuzu_database

Library

import pg2rml_star

# Neo4j

# redirect output mappings to stdout
pg2rml_star.bootstrap_mappings('neo4j://localhost:port@my_username:my_password/my_database')

# redirect output mappings to file
pg2rml_star.bootstrap_mappings('neo4j://localhost:port@my_username:my_password/my_database', 'mappings.yml')

# Kùzu

# if the Kùzu database is persisted on disk
pg2rml_star.bootstrap_mappings('path/to/my_kuzu_database')

# if the Kùzu database is loaded
import kuzu
db = kuzu.Database('./test')
pg2rml_star.bootstrap_mappings(db)

License 🔓

PG2RML-star is available under the Apache License 2.0.

Author & Contact 📬

Universidad Politécnica de Madrid.

Releases

No releases published

Packages

No packages published

Languages