Skip to content

Revise model for filters on term maps #9

Open

Description

@Aklakan

The current internal model for RML to SPARQL translation does not handle term maps and their corresponding lateral blocks as first class citizens, such that filters on term maps can not yet be easily translated. A revision of the internal model and the translation procedure is needed:

Example: Given the following term map:

 rr:predicateObjectMap [
      rr:predicate coy:hasAssetId;
      rr:objectMap [
        rml:reference "asset_id";
        rr:datatype xsd:string ;
        norse:rml.filter "?asset_id != ''" ; # filter out empty column
      ]
    ] ;

In the RML-to-SPARQL translation, RML term maps should be be translated to their own SPARQL LATERAL blocks, as sketched below:

  logicalSource
  LATERAL {
        { FILTER(?asset_id != '') BIND(?asset_id AS ?allocatedTermMapVar) }
      UNION
        { ... }
  }

Note, that filters on the logical source just drop bindings of that source, so on that level the current model shouldn't have much problems.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions