User:Eduards/SPARQL: Difference between revisions

From Riga Literata
Jump to navigation Jump to search
(Created page with "[https://www.mediawiki.org/wiki/Wikidata_Query_Service/User_Manual Wikidata Query Service/User Manual]<br> IMPORTANT: ''in Wikidata prefixes don't need to be specified explicitly in SPARQL queries''. However, in our Wikibase.cloud instance, prefixes must be explicitly stated, as [https://kbtestwikibase.wikibase.cloud/wiki/Project:SPARQL/examples#Federated_querying:_mixing_data_from_this_Wikibase_with_data_from_Wikidata this example] shows. Please note and mind the distin...")
 
No edit summary
Line 1: Line 1:
[https://www.mediawiki.org/wiki/Wikidata_Query_Service/User_Manual Wikidata Query Service/User Manual]<br>
[https://www.mediawiki.org/wiki/Wikidata_Query_Service/User_Manual Wikidata Query Service/User Manual]<br>
IMPORTANT: ''in Wikidata prefixes don't need to be specified explicitly in SPARQL queries''. However, in our Wikibase.cloud instance, prefixes must be explicitly stated, as [https://kbtestwikibase.wikibase.cloud/wiki/Project:SPARQL/examples#Federated_querying:_mixing_data_from_this_Wikibase_with_data_from_Wikidata this example] shows. Please note and mind the distinction between PREFIX kbwdt, kbwd, wdt and  wd.
IMPORTANT: ''in Wikidata prefixes don't need to be specified explicitly in SPARQL queries''. However, in our Wikibase.cloud instance, prefixes must be explicitly stated, as [https://kbtestwikibase.wikibase.cloud/wiki/Project:SPARQL/examples#Federated_querying:_mixing_data_from_this_Wikibase_with_data_from_Wikidata this example] shows. Please note and mind the distinction between PREFIX kbwdt, kbwd, wdt and  wd.
===SPARQL examples / templates===
ISSUE: ''the Wikidata [https://www.wikidata.org/wiki/Template:SPARQL SPARQL template] for query syntax highlighting is not implemented in this Wikibase''.
: SOLUTION: Instead one must use a ''<nowiki><sparql tryit="1">...</sparql></nowiki>'' wrapper, as demonstrated [https://kbtestwikibase.wikibase.cloud/w/index.php?title=Project:SPARQL/examples&action=submit in this example].<br>
IMPORTANT: The exact URL [https://kbtestwikibase.wikibase.cloud/wiki/Project:SPARQL/examples https://kbtestwikibase.wikibase.cloud/wiki/'''Project:SPARQL/examples'''], as well as the correct formatting of this page, are important to correctly display these query examples in the [https://kbtestwikibase.wikibase.cloud/query/# query services interface] (click the ''Examples'' button at the top)

Revision as of 13:10, 8 December 2022

Wikidata Query Service/User Manual
IMPORTANT: in Wikidata prefixes don't need to be specified explicitly in SPARQL queries. However, in our Wikibase.cloud instance, prefixes must be explicitly stated, as this example shows. Please note and mind the distinction between PREFIX kbwdt, kbwd, wdt and wd.

SPARQL examples / templates

ISSUE: the Wikidata SPARQL template for query syntax highlighting is not implemented in this Wikibase.

SOLUTION: Instead one must use a <sparql tryit="1">...</sparql> wrapper, as demonstrated in this example.

IMPORTANT: The exact URL https://kbtestwikibase.wikibase.cloud/wiki/Project:SPARQL/examples, as well as the correct formatting of this page, are important to correctly display these query examples in the query services interface (click the Examples button at the top)