Skip to main content
Version: 3.6

Uploading edits to Wikibase

This page explains how to upload your edits to the target Wikibase. It assumes you already have a created a Wikibase schema in your OpenRefine project.

Uploading with OpenRefine

  • Click WikidataUpload edits to Wikidata.
  • Log in with your personal account or your bot account depending on which account you want to use to make the edits. It is a good practice to use a bot password.
  • Supply a meaningful edit summary. This is especially important because OpenRefine condenses all your changes on the same item as one edit: if you are making multiple changes, the edit summary generated by Wikibase will not indicate clearly what sort of change you made. If you are making atomic changes, such as adding a single alias or statement, the automatic edit summaries will be more meaningful. If supported by your Wikibase instance, OpenRefine will append a link to the EditGroups tool, which lets you track and analyze your edit batch after upload.
  • Click Perform edits and wait for the operation to complete. You can watch your edits being made by checking your wiki contributions or the EditGroups tool.

Because performing edits in OpenRefine counts as an operation, you can extract this operation and reapply it to other projects. If you do so, you should also include the operation that saves the schema (only the last one is required), and make sure that the column names in the schema match those of the OpenRefine project where you are applying the operation.

Uploading with QuickStatements

This requires that the Wikibase site has an associated QuickStatements tool.

  • Click WikibaseExport to QuickStatements and copy the contents of the file;
  • Go to QuickStatements (for Wikidata it can be found at https://quickstatements.toolforge.org/) and login to authorize the tool to use your account;
  • Click Version 1 format;
  • Paste the generated changes in the text area;
  • Perform the edits with Run or Run in background.

Notable differences between the two methods

Merging strategy for terms and statements

OpenRefine offers various merging strategies for terms and statements. QuickStatements only supports one non-configurable merging strategy. Therefore, the merging strategies specified by the user in the schema are ignored when exporting to QuickStatements, which can result in unintended changes.

New item creation

OpenRefine supports creating new items with arbitrary relations between them.

QuickStatements supports creating new items with the CREATE instruction, and subsequent instructions can use the LAST placeholder to use the Qid of the last created item. When generating QuickStatements instructions, OpenRefine reorders your edits so that this syntax can be used. In rare cases, such as when a statement links two newly-created items, it is impossible to use QuickStatements to perform the edit. In this case, no QuickStatements script will be generated.

Speed and number of edits

OpenRefine generally performs one edit per item touched by an edit batch and at most two in general (in the case where new items contain links between them). This was chosen to minimize server load, speed up the upload and keep item histories compact. The downside is that the edit summaries can be less meaningful - it is therefore important that users supply informative summaries when uploading their batches. OpenRefine asymptotically edits at the rate of 60 edits per minute (so, usually 60 items per minute). The first edits are made more quickly, which is convenient for small batches.

QuickStatements performs incremental edits (for instance, when adding a statement with a qualifier and a reference, it will make three edits). That generally means lower speed, but more explicit item histories.