OpenRefine / OpenRefine/OpenRefine
Support menu option to "Add ID column" to help with row->record conversion
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 12k
- Forks
- 2.2k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 27
Description
When manipulating data in OpenRefine it is often useful to convert rows to records. When there isn't a natural "record ID" in the existing data, you have to add a new column with some unique value and move that column to be the first in the project. This takes several steps, and it would be convenient if there was a menu option that added such a column to a project without having to go through the individual steps manually.
See mention in this forum thread https://forum.openrefine.org/t/duplicating-rows-problem/2360/8
Proposed solution
A new menu item Add ID column could be added in All -> Edit columns which would add a new column at the start of the project (position 0) containing a unique value for each row
Alternatives considered
- Same approach but to have the item under the column drop down
Edit columnmenu (i.e. repeated for each column) - Similar approach, but rather than automatically adding a unique value, have an expression editor step where the user could either accept the default value (an expression to add a system generated unique value) or edit the expression used if they have a specific unique value generation they wish to use
- Rather than a specialist solution for adding an ID column at the start of the project, rather expand the
Add column based on this columndialogue to include the position in which the new column should be added. This would be a more general solution, that would make adding a leading column easier and would allow (or force depending on how you look at it) the user to edit the the expression used to create a unique value
Additional context
https://forum.openrefine.org/t/duplicating-rows-problem/2360/8
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the All → Edit columns menu entry point and the existing row-to-record conversion flow. Clarify how unique values should be generated, then verify that the menu action creates a unique column at position 0 and supports row-to-record conversion without the manual steps described.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- data, frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100