GithubHelp home page GithubHelp logo

Querying RDF graphs in windows about rsp-ql HOT 5 CLOSED

keski avatar keski commented on June 29, 2024
Querying RDF graphs in windows

from rsp-ql.

Comments (5)

dellaglio avatar dellaglio commented on June 29, 2024

Hi Robin,
I think we didn't take any final decision for the moment, as we are finalising first the work on defining RDF streams and their semantics.

I'd like to understand a bit more your query, in particular:

  1. what is "?g1"? It does not appear in the WHERE clause, so I am wondering how it can be bound
  2. does ?g mean: "any graph appearing in the window :w"?
  3. Which is the data over which "?subj2 :observedAt ?obj2" should match? (same for the content of the optional clause)

from rsp-ql.

keski avatar keski commented on June 29, 2024

Hi Daniele,

  1. and 3) There were some typos because I changed my example in the last second. Fixed.
  2. Yes, "any graph appearing in the window :w"

Now, the query would match all graphs in :w (and all triples in each). The pattern "?g :observedAt ?obj2" would filter the stream to include only those graphs which have that property set. Finally, the optional would catch any other meta data (such as other timestamps). Basically, it would copy the events (graphs) in the stream that match the filter (reusing the graph ids since they are the same events) and include all the meta about the events.

from rsp-ql.

keski avatar keski commented on June 29, 2024

In a similar way we could define a merge (join) as:

# Join of two stream s1 and s2
PREFIX : <http://examplel.org#>
REGISTER STREAM :joinedStream AS

CONSTRUCT ISTREAM {
   GRAPH ?g { ?subj1 ?prop1 ?obj1 . }
   ?g ?prop2 ?obj2 .
}
FROM NAMED WINDOW :w1 ON :s1 [RANGE PT10S]
FROM NAMED WINDOW :w2 ON :s2 [RANGE PT10S]
WHERE {
   {WINDOW :w1 {
      GRAPH ?g { ?subj1 ?prop1 ?obj1 . }
      OPTIONAL { ?g ?prop2 ?obj2 . }
   }}
   UNION
   {WINDOW :w2 {
      GRAPH ?g { ?subj1 ?prop1 ?obj1 . }
      OPTIONAL { ?g ?prop2 ?obj2 . }
   }}
}

In this query there are some details to be ironed out but this would at least be the principle in my mind. The neat thing about these queries is that the underlying graph structure in the streams doesn't have to be known since we can simply match everything in each graph.

Update:
In a merge scenario we would also have to be able to make sure that ordering among streamed items is maintained, basically, synchronise the stream if one lags behind the other by e.g. a few seconds.

from rsp-ql.

dellaglio avatar dellaglio commented on June 29, 2024

It's much clearer now, thank you.
Given that at the moment we are not focusing on the syntax of the query language, I think it would be great to move the discussion at a requirement/features level.

If I got correctly, you are asking for some features, e.g.

  • should be possible to access/query the annotations over the data stream items
  • should be possible to query the data items which annotations satisfy some contraints

In this context, I suggest to have a look at the requirements document and to check if they are already covered and, if not, to refine and add them.

from rsp-ql.

greenTara avatar greenTara commented on June 29, 2024

This discussion is also quite relevant for the abstract syntax and
semantics document, because query results should arise from entailments
(following the example of SPARQL), so to perform the sort of queries you
describe, the named graph structure must be supported the semantics of the
abstract syntax, which defines the entailments.

I have written the semantics of the abstract syntax so that the named graph
structure is retained, within an RDF dataset, and the entailments follow
from a particular specialization of RDF dataset semantics. So from this
perspective, we keep the opportunity to perform the sort of queries that
you describe above.

Tara

On Fri, Apr 15, 2016 at 1:45 AM, dellaglio [email protected] wrote:

It's much clearer now, thank you.
Given that at the moment we are not focusing on the syntax of the query
language, I think it would be great to move the discussion at a
requirement/features level.

If I got correctly, you are asking for some features, e.g.

  • should be possible to access/query the annotations over the data
    stream items
  • should be possible to query the data items which annotations satisfy
    some contraints

In this context, I suggest to have a look at the requirements document and
to check if they are already covered and, if not, to refine and add them.


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
#61 (comment)

from rsp-ql.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.