User:Geertivp/training/CSV to quick statements
< User:Geertivp | training
OBSOLETE: replaced by QuickStatements V2.
You can use CSV to quick statements and QuickStatements to import the results of a Wikidata Query back again into Wikidata.
It is possible to:
- import multiple statements for the same Subject in one pass
- create new Subjects and related statements
You should use the tool as a preprocessor to QuickStatements.
How to edit
- Create an Excel with the first column containing Qid (possibly empty to create a new Item)
- The other column titles can contain: Axx, Dxx, Lxx, Pxxxx, Sxxxxxx etc (xx=language; xxxx=P-number; Sxxxxxx=wikipedia instance)
- The subsequent rows/columns should contain the Object/Values linked to the Qid (possibly empty cells are skipped)
- Axx cells can contain a | separated list of Aliases
- Import the Excel file into CSV to quick statements
- Click on Validate
- Verify the results
- Copy/paste the results into QuickStatements
Note:
- If the first (Qid) column is empty, a new Subject is automatically created
Functionality edit
- Qid must be the first column (or it is not recognized)
- The order of the columns determine the order of execution in QuickStatements (this can be important to avoid duplicate object Qid/Lxx/Dxx error messages )
Advantages edit
The tool knows how to format the Values that QuickStatements accepts (quoted strings, Q-number, integer, date, etc)
Missing functionality edit
- Automatically remove any wd: or URL Q-prefix
- Could perform an upper() function to the Q-number or P-number
- A copy to QuickStatements button
- Qid-column could be possible everywhere
- When the Qid column would be missing it should create CREATE-LAST statements
- Empty column title colums should be ignored (currently they produce an error when importing; delete them before saving the final sheet)
Hints edit
- Prepare your edits with formulas, and fill-down
- Copy/paste values into a new sheet
- Delete unused columns before saving
Known problems edit
- The first column must contain the Subject Q-number (the Qid is not recognized in other columns; could be more flexible to allow Qid column to be everywhere)
- The Q-number can only contain the Q-number, no URL, no wd:, etc (could be stripped by the import tool)
- The tool does not properly handle UTF-8 characters from (Windows) Excel; so you will have problems to paste text into QuickStatements
- ⇒ You might use Linux instead
- Ctrl-a does not work properly (it selects the whole page instead of the data window; could we have a copy-all button, please?)
- Cannot import ";"-style CSV file ⇒ change Region and Language setting → Additional Settings → List separator as "," (tool should automatically detect the column separator)
- Unrecognized/empty column titles give an error *rArr; delete those columns before saving
Invalid entity ID edit
The application recognizes lowercase commands, but should Capitalize them, because QuickStatements does not recognize lowercase commands. Otherwise you get an error:
Q17277055 Dnl "kerkgebouw in Aarlen, België" Q17277055 Lnl "Église du Sacré-Cœur d'Arlon"
Processing Q3581386 (Q3581386 dnl "kerkgebouw in Aarlen, België") ERROR (set_string) : Invalid entity ID.
Processing Q17277055 (Q17277055 lnl "Église du Sacré-Cœur d'Arlon") ERROR (set_string) : Invalid entity ID.