Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revise model for filters on term maps #9

Open
Aklakan opened this issue Dec 8, 2023 · 0 comments
Open

Revise model for filters on term maps #9

Aklakan opened this issue Dec 8, 2023 · 0 comments

Comments

@Aklakan
Copy link
Member

Aklakan commented Dec 8, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant