Some questions about querying brick model

45 views
Skip to first unread message

J Li

unread,
May 10, 2021, 2:44:17 AM5/10/21
to Brick User Forum (Unified Building Metadata Schema)
Hi guys, 

sorry to bother you, I am working on a chatbot over brick .ttl. But I have some problems querying the Brick model. 
I cloned and deployed the brick-server. After uploading the model and data, I tested querying the model. Querying with a single entity and its data succeeds while querying to get all entities, querying with SPARQL or SQL returned empty results. I connected the databases of MongoDB, Postgres, and virtuoso, yet I couldn't find the uploaded file. I have the following questions:
1. When uploading a file, where is it stored?
2. Why querying with a single entity and its data succeeded while querying to get all entities, querying with SPARQL or SQL returned nothing? What did I miss?
3. Is it right to use the brick-server for backing chatbots? Should I do it with HodDB and  BTrDB?

Thanks.


J Li

unread,
May 11, 2021, 3:40:41 AM5/11/21
to Brick User Forum (Unified Building Metadata Schema)
Jena worked fine.

Gabe Fierro

unread,
May 13, 2021, 9:19:14 PM5/13/21
to J Li, Brick User Forum (Unified Building Metadata Schema), Xiaohan Fu
Hi there!

I am CC'ing Xiaohan, who has taken on some of the brick-server development after Jason graduated. He may be able to answer your questions about the implementation.

I'm glad you got Jena working! HodDB does not support as many SPARQL features as Jena and other fully-featured databases, but it is faster on the subset that is supported. If you prefer coding in Python, the Brickschema package (https://brickschema.readthedocs.io/en/latest/) uses RDFlib can host a simple SPARQL JSON endpoint (https://brickschema.readthedocs.io/en/latest/quickstart.html#web-interface : just do a POST of {"query": "SELECT ..."} to http://localhost:8080/query). It won't support updates, but you have it load a TTL file from disk into memory so persistence is pretty easy.

Best,
Gabe

--
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/49efd6f7-6703-4e58-aa61-672e5fc26a7fn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages