Query Builder is a tool, developed by Wikimedia Deutschland, to allow people who don’t know how to use SPARQL to build lists of Items, for example for maintenance purposes. To use this Simple Query Builder, the user only needs basic knowledge of how Wikidata models the Items for which they query. We hope that it will allow more people to get their first experience building queries and then maybe advancing to writing SPARQL directly once they figured out the basics with the Query Builder and got interested.
These pictures are screenshots from the current test system and have been updated in February 2021.
Painters born in Ghana
Painters with no reference attached to the place of birth
Items having an occupation but not being humans
Female fictional archaeologists
Food with an emoji
What Query Builder is not
- As a form-based query builder, Query Builder is not meant to replace the Wikidata Query Service or SPARQL queries, but to enable easy access to some really important features of SPARQL that are already pretty powerful.
- The Wikidata Query Builder will not include all of the features that SPARQL allows.
- Access to the SPARQL code interface will still be available for people who want to build queries in SPARQL, and accessing the SPARQL code of the visual queries will be possible.
- In the long run, the Query Builder will replace the existing "query helper" that is currently accessible from within the WDQS interface.
Development is happening. At the moment we are looking into adding support for more datatypes and making it possible to switch the language of the UI.
Features that are included in the current version
Here's a list of features included in the current version of the tool:
- List Items that have a concrete statement value for a given Property (e.g. “occupation: painter”), at least for the following datatypes: Item, time, quantity
- List Items that do not have a statement for a given Property (e.g. humans without a date of birth)
- List Items with a specific Property regardless of value (e.g. authors with a Bibliothèque nationale de France ID)
- Include results from subclasses etc. (Property Path)
- Check for the existence of a reference
- Combine query building blocks
- Display the labels of Items in the query result and offer to not display it to reduce the risk of timeout
- Limit the number of results
- Automatically determine which values should appear as a column in the result
- Internationalisation of the interface incl. RTL support (by adding
?uselang=+ language code at the end of the URL)
- Possibility to access the SPARQL code interface and SPARQL query
- Link from the existing Wikidata Query Service interface to access the SQB
- Link to a pre-filled SQB query
Features that will be included in a later version
Here's a list of features that are planned to be involved in a later version of the tool:
- Filtering for dates and quantities (e.g. a date between 1900 and 1920)
We will definitely want to hear from you, whether we forgot some crucial feature you would need for your maintenance work. Based on your feedback, we may add more features in the future.
Features that will not be included
- Translating from SPARQL to the visual representation (because that is too complex and we can’t account well for the types of queries the visual query builder can’t handle).
Timeline and updates
- August 2021: The Wikidata Query Builder is deployed: https://query.wikidata.org/querybuilder/. Feedback and suggestions still welcome on Wikidata talk:Query Builder.
- May 2021: We finished usability testing of new features and incorporated feedback from users including people with visual impairments and RTL languages. It is now possible to query for dates and we're also looking into making the Query Builder discoverable from the Wikidata Query Service.
- February 2021: Update on the new features integrated in the test system, some improvements on this documentation page, rename the feature from "Simple query Builder" to "Wikidata Query Builder"
- November 2020: the test system is made available
- June-July 2020: test new click-dummies with several users
- August 2020: development of the first version starts
- January to April 2020: user research about workflows for queries and lists, including a first concept for the SQB]
- 2018: Query Helper integrated in the Query Service UI
- January 2018: Thesis from Jakob Warkotsch, including a first prototype (not maintained anymore)
Updates of the development will be announced on the usual communication channels (Project Chat, weekly newsletter, etc). At any point, feel free to give feedback on the talk page.