Is there any way to remove expressions from the History in Add column based on this column?
I have one in there that's valid syntax, but it doesn't work, and it differs only in 1 character with one that does. So I want to remove the former and retain the latter.
I usually 'Star' the expressions (click the star on the left) which I intend to use again, then use the 'Starred' tab to find them later. Conveniently, the History tab also indicates whether an expression is starred, so you would immediately see that your 'good' one is the one to use if you're looking through the expressions listed on that tab.
1 Like
I think @RolfBly refers to the history under the Undo / Redo
tab.
You can follow those steps to remove one operation from the history. As a safety measure, you should create a backup of your project under Export
> OpenRefine project archive to file
first.
- Click
Extract
and using the checkbox, select all the steps you want to retain after the operation you want to remove. Copy and paste the JSON on the right side of the screen in a notepad.
- Roll back the project history by selecting the step before the one you want to remove.
- Select
Apply
and paste the JSON you extracted in step 1.
For reference, here is the link to the Undo/Redo in our documentation.
Hi @Martin,
thanks, but no, I was referring to the history in the Add column based on this column-window. And I want to remove it from the history there, entirely. Your method wipes it from the project history, I think.
I'm OK with the workaround that @jquartel mentioned (and I had already found).
Case closed?
1 Like
Just to confirm, there is no way to remove entries from the expression history. They will roll off the end of the list when the upper limit (100 currently) is reached.
1 Like
Hi , In addition to this this question (which I also had), I was wondering how to export (my favourites) in the GREL History (the starred expressions at least)? While I had/have to work on different devices, I was able to transport all my projects by copying all the local stored files, including al the history of each projects, which is stored in the Undo/Redo) but then the GREL history seemed to be not included (which is in the Add column based on this column -window).
Thanks in advance!
There is no official way to do this. This means that it can and will change in future versions of OpenRefine. The list of expressions is currently stored in the workspace.json file, as of v3.x…
On the Mac, you can find it here: ~/Library/Application\ Support/OpenRefine/workspace.json
If you have the jq
tool installed on your machine (a Mac in this example), you can export the list with this command:
cat ~/Library/Application\ Support/OpenRefine/workspace.json | jq '.preferences.entries."scripting.expressions".list'
You would probably be safer to export the operation containing the expression you want to keep that you can find in the Undo/Redo tab.
Good luck! Regards, Antoine