Antonin Delpeuch
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    1
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # OpenRefine-SDC integration: design questions for the SDC team ## Background [OpenRefine](https://openrefine.org/) is a data wrangling tool used by various communities to transform data into structured formats, using the Extract-Transform-Load (ETL) paradigm. It is used by the Wikidata community for data imports thanks to the [dedicated integration](https://www.wikidata.org/wiki/Wikidata:Tools/OpenRefine) for this knowledge graph in the tool as an extension that is shipped in the official bundle. ([Short video tutorial for the integration](https://www.youtube.com/watch?v=wfS1qTKFQoI).) In the summer 2020, Lu Liu (GSoC student working on OpenRefine) is working on generalizing the extension to make it compatible with any Wikibase instance ([OR issue #1640](https://github.com/OpenRefine/OpenRefine/issues/1640)). As part of this work, we need to come up with a way to describe a Wikibase instance and all the surrounding services that OpenRefine relies on for its integration (SPARQL query service, reconciliation service and a large number of configuration parameters). This document presents some questions from the OpenRefine team about Structured Data on Commons, which come up as we draft plans to add support for it in OpenRefine ([OR issue #2144](https://github.com/OpenRefine/OpenRefine/issues/2144)). Wikidata integration in OpenRefine is based on the [Wikidata-Toolkit Java library](https://github.com/Wikidata/Wikidata-Toolkit), which we actively contribute to, and some of the generalizations we need to do will happen in Wikidata-Toolkit itself (such as [WDTK issue #474](https://github.com/Wikidata/Wikidata-Toolkit/issues/474)), therefore benefiting a range of other tools. ## Our goal with SDC integration We want to make this integration **as generic as possible**: just like our Wikidata support should have been generic enough to support any Wikibase instance from the outset, we want to make sure we anticipate any generalization of SDC's set up as early as we can. ## Main issues ### Federation Wikimedia Commons uses Wikidata entities in its statements. Our understanding is that although this mechanism is readily available to other Wikibase instances, it is currently restricted to MediaWiki instances sharing the same database cluster (so federation between a WMF Wikibase and a third-party Wikibase is not possible yet). The way we represent Commons' federation scenario with Wikidata in OpenRefine should ideally match any plans you have on your side to make this mechanism more generic and reusable. If other third party Wikibase instances get federated, it should only be a matter of changing OpenRefine's configuration to upload structured data to other instances which use federation. WMDE's [federated properties project](https://phabricator.wikimedia.org/tag/wikibase_-_federated_properties/) is interesting for us in this regard. To configure a Wikibase instance in OpenRefine, we could of course replicate the configuration options available to Wikibase instance administrators introduced in this project. But as we anticipate those configuration options might become more flexible in the future, it could be useful to have a broad idea of the range of likely generalizations and come up with an integration that would easily adapt to these. For instance, does it make sense for us to build our integration with the intention to support: * mixes of local and federated properties in the same entity? * snaks with local properties and federated values? * snaks with federated properties and local values? * … a lot more scenarios could be considered! With these sort of questions in mind, it should be possible to come up with a configuration format which is flexible enough for a reasonable range of federation scenarios. The technical hurdles to federation are much lower on OpenRefine's side, since we are already used to representing Wikibase entities through the view of the MediaWiki API, so it is mostly a question of getting the expressivity of the configuration format right. So even if some scenarios currently seem hard to add support for from Wikibase's technical perspective, it might be worth keeping them in scope for us if they make sense as a legitimate user story for Wikibase. What we need to understand on our side is what to expect as a MediaWiki API client: for instance, being able to determine reliably which Wikibase instance an entity id is coming from, when consuming statements in JSON, or knowing which Wikibase instance holds the domain of snak values for a given property, and so on. ### Entity id generation Commons uses the page ids of the media files to associate MediaInfo entity ids to them. If another MediaWiki instance wanted to add structured data to the files it holds, would it necessarily use the same mechanism? If not, what would be the appropriate MediaWiki API action to convert a file name to an entity id or conversely? ### Discoverability of Wikibase's configuration OpenRefine needs to know of quite a few of Wikibase's configuration parameters to integrate with it: * MediaWiki namespaces and their associated page types (wikitext, file, item, property, lexeme, mediainfo…); * RDF namespaces; * Special entities which have a custom role (such as [formatter URL (P1630)](https://www.wikidata.org/wiki/Property:P1630)); * Entity ids used by Wikibase Quality Constraints, if installed (such as [property constraint (P2302)](https://www.wikidata.org/wiki/Property:P2302)); * Query service URL; * and so on. All this can be discovered by humans who can cook up a configuration file for OpenRefine with the appropriate parameter values. However, as a Wikibase admin, I would ideally like to configure these parameters in a single location (Wikibase's own config file) and tools such as OpenRefine should be able to retrieve them from Wikibase directly (via some action in the MediaWiki API). This is not a strong requirement for the integration: just something worth keeping in mind when adding new configuration parameters that could be safely exposed. This problem has been tackled by WMDE in their Manifest Extension project: https://phabricator.wikimedia.org/tag/wikibase_-_automated_configuration_detection_wikibasemanifest/

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully