Page MenuHomePhabricator

native sparql support
Closed, DeclinedPublic

Description

Author: joel

Description:
Semantic mediawiki is very nice and lets you do many nifty things that just aren't possible with vanilla mediawiki. However, the {{#ask: ... }} interface is quite limited compared to what you could do with sparql, and it would be really nice if smw could ship with sparql support. What I want to do, for example, which is currently impossible:

  1. Report properties from other pages:

For example, a product has several [[available from::shop]] and each shop is [[located at::city]]. I want to dynamically generate lists of products along with which shop and city I can get it from, and I want to do it without jumping through the template hoops where the {{#ask: ... |template=foo}} template does a secondary query for the city.

  1. Query for properties, not for pages:

A page has one or more [[concerns::field]]. I want to get at the individual fields for further processing, I do not want a comma separated list that I have to unreliably parse and string mangle.

  1. Compare multiply set properties across pages:

A page has one or more [[concerns::field]] and a person has one or more [[expertise::field]]. For any given page I want to be able to generate dynamic lists of people who are experts in one or more of the concerned fields, and I do not want to repeat myself and give the fields again in the query.

  1. And more...

Version: unspecified
Severity: enhancement

Details

Reference
bz29538

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 21 2014, 11:30 PM
bzimport set Reference to bz29538.

You might already be aware of this, but SMW 1.6 introduces native support for triplestores, which means that instead of using the MySQL/whatever database used by your MW install, SMW will store it's data in this tripplestore and query from it. This then obviously allows doing SPARQL queries against your tripplestore for data stored by SMW. Is that what you want to be able to do, or do you want to be able to display data in your wiki based on SPARQL queries as well? IIRC some people showed some demo of an extension with capabilities along these lines on the last fall SMWCon; not sure what the state of that is. There is some new extension that allows embedding visualizations that pull data using SPARQL that works completely loose from SMW, but it's still very preliminary and does not support near as many formats as SMW: https://secure.wikimedia.org/wikipedia/mediawiki/wiki/Extension:Spark

joel wrote:

Hey, neat!

I guess I should have specified, but I guess what I'm looking for is a sort of {{#sparql: ... }} replacement for {{#ask: ... }} for inline queries, using SMW's types for rendering stuff correctly and creating sortable tables and the like.

I reckon some output formatting code would have to be restructured though, since it's currently quite page-centric, one per row, and I guess what I'm suggesting would rather produce rows containing zero or more pagenames and zero or more properties. Does that make sense?

Aklapper subscribed.

The Semantic MediaWiki developers requested in https://phabricator.wikimedia.org/T64114 to move their task tracking to https://github.com/SemanticMediaWiki/SemanticMediaWiki/issues and to close remaining tasks in Wikimedia Phabricator. If you still face the problem reported in this task in a supported version of SMW, please feel free to transfer your report to https://github.com/SemanticMediaWiki/SemanticMediaWiki/issues . We are sorry for the inconvenience.