You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sources:
citizen:
queryFormulation: mysql
query: select * from citizen right join child_birth on citizen.citizenid = child_birth.experiencedby left join birth_reg on child_birth.child_birthid = birth_reg.associatedwith;
I'm submitting a
Current Behaviour:
I 'm trying to generate rdf files as follows:
config = f"""
[DataSource1]
mappings=rules2.r2rml.ttl
db_url=mysql+pymysql://root:Kaboyacci3143@localhost/webgov
"""
import kglab
namespaces = {
"rv": "http://WebGov.RiversState.gov.ng/"
}
kg = kglab.KnowledgeGraph(
name = "RV WebGov KG",
namespaces = namespaces
)
kg.materialize(config)
save RDF as ttl
kg.save_rdf("rules2_rdf-triples.ttl")
save RDF as jsonld
kg.save_jsonld("rules2_rdf-triples.jsonld")
But I get "RE: IndexError: too many indices for array: array is 0-dimensional, but 1 were indexed" error
Expected Behaviour:
Generate the rdf files without the index error
Steps to reproduce:
My yml file, from which the mapping file is generated, is given as follows:
prefixes:
rv: "http://WebGov.RiversState.gov.ng/"
sources:
citizen:
queryFormulation: mysql
query: select * from citizen right join child_birth on citizen.citizenid = child_birth.experiencedby left join birth_reg on child_birth.child_birthid = birth_reg.associatedwith;
mappings:
citizenm:
sources: citizen
s: http://WebGov.RiversState.gov.ng/$(citizenid)
po:
- [a, rv:citizen]
- [rv:firstname, $(FirstName)]
- [rv:lastname, $(LastName)]
- [rv:dateofbirth, $(Date_Of_Birth)]
- [rv:sex, $(Sex)]
- p: rv:experiences
o:
- mapping: child_birth
condition:
function: equal
parameters:
- [str1, $(child_birthid)]
- [str2, $(child_birthid)]
child_birth:
sources: citizen
s: http://WebGov.RiversState.gov.ng/$(child_birthid)
po:
- [a, rv:child_birth]
- [rv:placeofevent, $(PlaceOfEvent)]
- [rv:dateofevent, $(DateOfEvent)]
- [rv:experiencedby, $(citizenid)]
- [rv:child_birthid, $(child_birthid)]
Snapshot:
Environment:
The text was updated successfully, but these errors were encountered: