SPARQL query

28 views
Skip to first unread message

Daniele Antonucci

unread,
Apr 30, 2021, 9:40:41 AM4/30/21
to Brick User Forum (Unified Building Metadata Schema)
Hi all, 

I have a question regarding how to get data from a .ttl file using sparql query when I have a structure like this.

bldg:PM10sens2 a brick:PM10_Sensor ;
brick:hasLocationOf bldg:Office0.21 ;
brick:hasUnit unit:PPM ;
brick:isPointOf bldg:IEQ_meter2 ;
brick:timeseries [ brick:hasTimeseriesId "123456" ] .

I would like to get  the value of the TimeseriesId.

Many thanks

All the best,

Daniele

Ambuj Shatdal

unread,
Apr 30, 2021, 10:00:17 AM4/30/21
to Daniele Antonucci, Brick User Forum (Unified Building Metadata Schema)
A good starting book for SPARQL is DuCharme’s Learning SPARQL. Of course, there are various online resources.

   SELECT DISTINCT ?pt ?tsid
   WHERE {
       ?pt a brick:PM10_Sensor . 
       ?pt brick:timeseries [brick:hasTimeseriesId ?tsid ] .
   }
   
Query Results ( 1  rows):
https://example.com/Building#PM10sens2 123456 

--
You received this message because you are subscribed to the Google Groups "Brick User Forum (Unified Building Metadata Schema)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to brickschema...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/brickschema/d6fa13a7-d344-42ae-9d68-35d1aeebee6dn%40googlegroups.com.

Antonucci Daniele

unread,
Apr 30, 2021, 10:02:12 AM4/30/21
to Ambuj Shatdal, Brick User Forum (Unified Building Metadata Schema)

 

Thank you so much for both pieces of information, very helpful.

 

Best

 

Daniele

Reply all
Reply to author
Forward
0 new messages