Template:Wikidata tabular
This documentation is transcluded from Template:Wikidata tabular/doc.
Usage
This template defines a tabular data set based on Wikidata. The template must be placed on the Talk page of the tabular data set, the data in the set will be periodically (once every 24h) replaced by the bot-generated data.
Parameters (both are required):
- sparql
- A SPARQL SELECT query. Needs to return
?itemas the item number. Always check your query to make sure it works.
See SPARQL query service examples suitable for Listeria for examples of queries you can perform. - columns
- Defines the columns of the result to export to the table. The columns are matched by order - first column defined goes to first column of the data, etc. Allowed values are :
item, the Q item number.?fieldname, a SPARQL result field.label, the wiki-language-based label of the item, linked to the local article (where exists), or the Wikidata item.description, the description of the item.alias, the aliases of the item.
The three above values will be multilingual sets of strings, so their columns should be typed as localized.
The SPARQL columns can be followed by type, e.g. ?birthDate:date. The types are:
int- Integernumber- Floating point numberdate- Date as YYYY-MM-DDitem- Wikidata item ID. The SPARQL variable it applies to must contain the URI of the Wikidata item, which will be converted to just the Q-id.
No description.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| sparql | sparql | SPARQL query | String | required |
| columns | columns | Column definitions for tabular result | String | required |