ckanext-kgcreation
is a CKAN plugin that adds the ability to generate RDF triples from datasets, services, resources, and organization.
KGCreation uses SDM-RDFizer (https://github.com/SDM-TIB/SDM-RDFizer) as a knowledge graph creation engine.
To install ckanext-kgcreation:
Activate your CKAN virtual environment, for example:
. /usr/lib/ckan/default/bin/activate
Install the ckanext-LDM_SPARQL Python package into your virtual environment:
pip install ckanext-kgcreation
Add
kgcreation
to theckan.plugins
setting in your CKAN config file (by default the config file is located at/etc/ckan/default/ckan.ini
).Set up Enviroment Variables in the
.env
file.CKAN_KG_DOMAIN
sets the value for the Domain of knowledge graph.ENDPOINT_URL
sets the value of the url of the endpoint. ForENDPOINT_URL
, only add the domain (i.e. http://localhost), the port will be added in the code.When using the Docker image for CKAN and a docker container endpoint, replace the line 40 in file
Virtuoso_Util.py
:self.virtuosoGraph = config.get("LDMSPARQL_ENDPOINT_GRAPH", os.environ.get('CKAN_KG_DOMAIN') + ':8890/')
with:
self.virtuosoGraph = config.get("LDMSPARQL_ENDPOINT_GRAPH", 'http://endpoint:8890/')
endpoint
is the variable indocker-compose
that represents the endpoint.Restart CKAN. For example if you've deployed CKAN with Apache on Ubuntu:
sudo service apache2 reload