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
Ah yes, I didn't think the joins too much through :P. This would require much more extensions, eg next to a TriplesMap also a LiteralElementMap that can have a different logicalSource, something like below.
@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@base<http://example.com/base/> .
<TriplesMap1>a rr:TriplesMap;
rml:logicalSource [
rml:source "input-3/input.json";
rml:referenceFormulation ql:JSONPath;
rml:iterator "$.persons"
];
rr:subjectMap [
rr:template "http://example.com/persons/{firstname}";
];
rr:predicateObjectMap [
rr:predicate ex:lastName ;
rr:objectMap [
rml:reference "lastname";
rml:languageMap [
a rr:RefObjectMap ; # I guess we need a new name for this too, maybe a RefLiteralElementMap cfr. https://github.com/kg-construct/mapping-challenges/pull/21#issuecomment-738617830?
rr:parentTriplesMap <TermMap1>;
rr:joinCondition [
rr:child "firstname" ;
rr:parent "firstname" ;
]
]
]
].
## WARNING BELOW IS INTRODUCING WAAAY MORE CHANGES THAN ANTICIPATED<TermMap1>a rr:LiteralElementMap;
rml:logicalSource [
rml:source "input-3/input.json";
rml:referenceFormulation ql:JSONPath;
rml:iterator "$.languages"
];
rml:reference "language" .
I'm not sure we want to go this far.
This is (of course! :P ) also solvable using a fno:Function (as an fno:Function could refer to a different logicalSource), it would require something like below, but the whole 'using functions across different logicalSources' needs to be further specified
rml:languageMap [
fnml:functionValue [
rml:logicalSource [
rml:source "input-3/input.json";
rml:referenceFormulation ql:JSONPath;
rml:iterator "$.languages"
];
rr:predicateObjectMap [
rr:predicate fno:executes ;
rr:objectMap [ rr:constant idlab-fn:trueCondition; rr:termType rr:IRI ]
];
rr:predicateObjectMap [
rr:predicate idlab-fn:strBoolean ;
rr:objectMap <#EqualsFunction>
];
rr:predicateObjectMap [
rr:predicate idlab-fn:str ;
rr:objectMap [ rr:reference "language" ]
]
]
].
<#EqualsFunction>
fnml:functionValue [
rml:logicalSource [
rml:source "input-3/input.json";
rml:referenceFormulation ql:JSONPath;
rml:iterator "$.persons"
];
rr:predicateObjectMap [
rr:predicate fno:executes ;
rr:objectMap [ rr:constant idlab-fn:equal ]
];
rr:predicateObjectMap [
rr:predicate grel:valueParameter ;
rr:objectMap [ rml:reference "languages" ] # TODO we need to specify which logical source we take this from
];
rr:predicateObjectMap [
rr:predicate grel:valueParameter2 ;
rr:objectMap [ rml:reference "languages" ] # TODO we need to specify which logical we take this from
]
]
].
I have the feeling we could use xrr:pushDown here to join over different data sources as well (@frmichel what do you think?). We have options. But maybe the first question should be: do we want to go this complex? :P @VladimirAlexiev have you come across this use case?
The text was updated successfully, but these errors were encountered:
What would a join on a language map look like?
Originally posted by @pmaria in #21 (comment)
Ah yes, I didn't think the joins too much through :P. This would require much more extensions, eg next to a TriplesMap also a LiteralElementMap that can have a different logicalSource, something like below.
I'm not sure we want to go this far.
This is (of course! :P ) also solvable using a fno:Function (as an fno:Function could refer to a different logicalSource), it would require something like below, but the whole 'using functions across different logicalSources' needs to be further specified
I have the feeling we could use xrr:pushDown here to join over different data sources as well (@frmichel what do you think?). We have options. But maybe the first question should be: do we want to go this complex? :P @VladimirAlexiev have you come across this use case?
The text was updated successfully, but these errors were encountered: