Page MenuHomePhabricator

Importing the SPARQL2 template into a Wikibase instance from Wikidata
Open, Needs TriagePublic

Description

I am trying to use a custom wikibase instance to work as a documentation system for federated queries. For this to work the SPARQL2 template from Wikidata is needed, however this template builds on my downstream templates. I started creating similar templates in the custom wikibase, but it feels like going into a rabbit hole. Is it possible to fetch the SPARQL2 template from Wikidata and all underlying templates in one task?

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

For the avoidance of confusion in order to make this work in the Wikibase-Containers environment we'll need to add Scributo so that these kind of templates work. For this there is a long standing task: T197649

https://www.wikidata.org/wiki/Template:SPARQL2 was exxentially replaced by https://www.mediawiki.org/wiki/Extension:WikibaseInWikitext for wikibase.cloud to avoid the mess of importing templates etc

This is likely the sort of thing that Wikibase (3rd party installations) would want to use, and likely should be adopted and included in "wikibase suite deploy" etc too

Example in wikitext

==Examples==

===Select All Triples===

<sparql tryit="1">
SELECT * WHERE { ?a ?b ?c }
</sparql>

===Select All Triples relating to Q1===

<sparql tryit="1" list="1">
SELECT * WHERE { <http://addshore-alpha.wiki.opencura.com/entity/Q1> ?b ?c }
</sparql>

Example rendered

image.png (702×1 px, 53 KB)

likely should be adopted and included in "wikibase suite deploy" etc too

Agree.