Comments (1)
Hi! I modified my code and now it works. In particular, I refer to the documentation https://morph-kgc.readthedocs.io/en/stable/documentation/#data-sources and put the reference to the database in the config part as db_url.
-> mapping file:
@prefix rr: <http://www.w3.org/ns/r2rml#>.
@prefix rml: <http://w3id.org/rml/>.
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
@prefix mimic: <http://mimic-translation-project.org/>.
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
@base <http://mimic-translation-project.org/> .
<T0> a rml:AssertedTriplesMap;
rml:logicalSource [
rr:tableName "mimic_untouched.caregivers";
];
rml:subjectMap [
rr:template "http://mimic-translation-project.org/res/caregiver{cgid}"
];
rr:predicateObjectMap [
rr:predicate mimic:cgId;
rml:objectMap [
rr:column "cgid";
rr:datatype xsd:integer
]
];
;
rr:predicateObjectMap [
rr:predicate mimic:label;
rml:objectMap [
rr:column "label"
]
];
rr:predicateObjectMap [
rr:predicate mimic:description;
rml:objectMap [
rr:column "description"
];
].
->.py file:
import morph_kgc
config = """
[DataSource1]
mappings = D:/TIROCINIO/TRANSLATION_CODE/caregivers/caregivers_mapping.ttl
db_url = postgresql+psycopg://----:------@------:-----/mimic
"""
graph = morph_kgc.materialize(config)
graph.serialize(destination="D:/TIROCINIO/mimic-iii-clinical-database-1.4-ttl/caregivers1.ttl")
from morph-kgc.
Related Issues (20)
- Missing triples in output (mapping file with self-join) HOT 1
- rdf-star generation failed HOT 5
- JSON Files Format HOT 1
- Question: Why is using RML file slower than YARRRML HOT 1
- Maintain documentation in a separate repository HOT 1
- Update duckdb dependency to latest stable version (v.0.10.0)
- Mandatory dependency sqlalchemy HOT 3
- ENH: Specify relational database through YARRRML data source HOT 1
- NULL value not ignored for Parquet file format HOT 4
- Output to Kafka topic doesn't seem to work HOT 4
- AttributeError: 'DataFrame' object has no attribute 'map' in version 2.7.0 HOT 2
- Use of UDFs when fetching data from Oracle for building KG HOT 4
- Applying rml:reference to each RML-F result HOT 2
- YARRRML conditions on objects are not correctly processed HOT 3
- YARRRML external references HOT 1
- Issue with use of functions in YARRRML configuration HOT 2
- Two logical sources with rr:sqlQuery for the same table HOT 2
- Use of YARRRML with a Pandas dataframe as source HOT 5
- Impala connector HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from morph-kgc.