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

Joins without conditions #43

Open
lars-vc opened this issue Aug 8, 2022 · 1 comment
Open

Joins without conditions #43

lars-vc opened this issue Aug 8, 2022 · 1 comment

Comments

@lars-vc
Copy link

lars-vc commented Aug 8, 2022

It appears that currently conditionless joins are not supported in the RMLStreamer, however these do work in the RMLMapper.
Example yarrrml file that uses conditionless joins:

prefixes:
 ex: "http://example.com/"
 schema: "https://schema.org/"
 dct: "http://purl.org/dc/terms/"
 xsd: "http://www.w3.org/2001/XMLSchema#"
 sosa: "http://www.w3.org/ns/sosa/"
 tm: "https://w3id.org/transportmode#"
 rdfs: "http://www.w3.org/2000/01/rdf-schema#"
 geo: "http://www.opengis.net/ont/geosparql#"
 tree: "https://w3id.org/tree#"
 ldes: "https://w3id.org/ldes#"
 wgs84: "http://www.w3.org/2003/01/geo/wgs84_pos#"

mappings:
  observation:
    sources:
      - [../../../data/test.xml~xpath, /gpx/trk/trkseg/trkpt]
    subject: http://location.example.com/tracks/observation/$(time)
    predicateobjects: 
      - [sosa:hasFeatureOfInterest, PERSONURL~iri]
      - [sosa:resultTime, $(time), xsd:dateTime]
      - [a, sosa:Observation]
      - [sosa:hasResult, http://location.example.com/tracks/observation/result/$(time)~iri]
      - [sosa:observedProperty, http://location.example.com/location~iri]
      - [sosa:hasSimpleResult, POINT($(@lon) $(@lat)), geo:wktLiteral]
      - [dct:isVersionOf, VERSIONURL~iri]
      - [sosa:madeBySensor, SENSORURL~iri]
  result:
    sources:
      - [../../../data/test.xml~xpath, /gpx/trk/trkseg/trkpt]
    subject: http://location.example.com/tracks/observation/result/$(time)
    predicateobjects: 
      - [wgs84:latitude, $(@lat)]
      - [wgs84:longitude, $(@lon)]
      - [wgs84:elevation, $(ele)]
      - [a, sosa:Result]
      - [tm:transportMode, TRANSPORTMODE~iri]
  location:
    sources:
      - [../../../data/test.xml~xpath, /gpx]
    subject: http://location.example.com/location
    predicateobjects:
      - [a, sosa:observedProperty]
      - [rdfs:comment, "The Geographic location observed by a sensor.", en~lang]
      - [rdfs:label, "Location", en~lang]
  person:
    sources:
      - [../../../data/test.xml~xpath, /gpx]
    subject: PERSONURL
    predicateobjects:
      - [a, sosa:FeatureOfInterest]
  sensor:
    sources:
      - [../../../data/test.xml~xpath, /gpx]
    subject: SENSORURL
    predicateobjects:
      - [a, sosa:Sensor]
      - [sosa:observes, http://location.example.com/location~iri]
      - [sosa:isHostedBy, DEVICEURL~iri]
      - predicates: sosa:madeObservation
        objects:
          - mapping: observation
  platform:
    sources:
      - [../../../data/test.xml~xpath, /gpx]
    subject: DEVICEURL
    predicateobjects:
      - [a, sosa:Platform]
      - [sosa:hosts, SENSORURL~iri]

The sensor makes all the observations and is therefore joined without condition
ref: @s-minoo

@s-minoo
Copy link
Contributor

s-minoo commented Aug 18, 2022

Current implementation of joining in RMLStreamer requires a join condition to be defined for streaming data sources.

One solution to solve this would be to annotate the data with a "marker" condition attribute matching all pairs with each other.

We'll look into supporting this.

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

2 participants