Skip to content

granularity of target attachment #66

Open
@VladimirAlexiev

Description

@VladimirAlexiev

Are there real use cases where different triples need to be directed to different targets?
https://kg-construct.github.io/rml-resources/portal/requirements/requirements-io.html doesn't describe such.
What is the value of saving some triples of a subject to a file, and other triples to a SPARQL endpoint?

https://kg-construct.github.io/rml-io/spec/docs/#multiple-targets describes endless combinations of targets attached to different levels, but are they useful?

Furthermore, while a quad can go into multiple targets, the entirety of a quad must go to one target: you cannot store its components <g,s,p,o> and o=<value,lang,datatype> in different targets.

If it's a valid case to specify target per languageMap, is it not also valid to specify it per datatypeMap?

So I question the accuracy of statements like this: https://kg-construct.github.io/rml-io/spec/docs/#language-and-graph-map

All triples containing the language tag en are exported to TargetDump1 and all triples within the named graph ex:Characters are exported to TargetDump2.

Consider the map:

  rml:predicateObjectMap [ a rml:PredicateObjectMap;
    rml:graphMap [ a rml:GraphMap;
      rml:logicalTarget <#TargetDump2>;
      rml:constant ex:Characters;
    ];
    rml:predicateMap [ a rml:PredicateMap;
      rml:constant foaf:name;
    ];
    rml:objectMap [ a rml:ObjectMap;
      rml:reference "name/text()";
      rml:languageMap [
        rml:logicalTarget <#TargetDump1>;
        rml:constant "en";
      ];
    ];
  ];

It makes quads with g=ex:Characters, p=foaf:name, lang=@en.
The graphMap and languageMap set these quad components, they don't test them.
So all these quads go to TargetDump1 and TargetDump2: the quoted sentence is confusing since it implies that different sets of triples go to different targets.

Then wouldn't it be better to put the targets at the predicateObjectMap level to make this more clear?

  rml:predicateObjectMap [ a rml:PredicateObjectMap;
    rml:logicalTarget <#TargetDump1>, <#TargetDump2>;
    rml:graphMap [ a rml:GraphMap; rml:constant ex:Characters; ];
    rml:predicateMap [ a rml:PredicateMap; rml:constant foaf:name; ];
    rml:objectMap [ a rml:ObjectMap;
      rml:reference "name/text()";
      rml:languageMap [rml:constant "en"; ];
    ];
  ];

Last but not least, it should be possible to set the target at the level of TripleMap to cater for the most common case.


In summary, I propose to set targets at TripleMap and predicateObjectMap levels,
but not at subjectMap, predicateMap, objectMap, graphMap, languageMap.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions