Manual entries are not stored in the history?

Hi New to OpenRefine and trying to create repeatable history so I can reimport new data with previous same results. It appears that manual edits of cells and flag/star an entry and say delete that entry do not get recorded in the history so it's repeatable.

Is there a workaround for both types of events? I use facets for many transformations in the data but there are situations in which a manual edit of a cell is needed. Or if wanting remove the row all together that doesn't get recorded.

I would think since OpenRefine knows of the column that's the unique record, I would think these are both easy items to do.

What's a possible workaround for these two issues? I would like to keep it in all done in OpenRefine but it seems I must resort to using Google Sheets or some other API option?

Thanks in advance.

So you're looking for support of full Row/Record indexing of cells in the history?

Say for instance, you delete E:12 and X:5. And you'd want that recorded in the history somehow, because you have another dataset where you'd want to repeat those deletes (make null or blank) for those 2 specific cells? Did I correctly state your needs?

Hi @lludwig while manual entries are recorded in the history within a project (i.e. you can "Undo" and "Redo" them in the Undo/Redo tab), they are not available to export when you click "Extract" for the operation history.

I think the reasoning is that because these are applied to a cell in a specific row, re-using that entry doesn't make sense as you could not guarantee that the same cell would be in the same row in another project. I did previously work with an extension that had functionality to avoid this problem - but I'm afraid that extension is no longer maintained or available. But - you can work around the issue

If you want to always be able to extract your expressions, rather than doing an individual cell edit, you need to instead write a transformation that will only change the cell you want. So for example instead of directly editing a value in the 3rd row of a project you could do a transformation on the column like:

if(row.index==2,"updated text",value)

This will have the same affect as editing the cell in row 3 (note that the row.index is zero based so the first row is 0 the second is 1 etc) - but because you've written it as a transformation it will be exportable from the History.

I wouid almost always recommend trying to write an expression that uses some aspect of the data present to identify the row rather than the row.index which is a fragile way of identifying the thing you want to change (if the data is imported in a different order in a future process, then you'd end up editing the wrong row).

The same approach can be taken with removing rows. You can write a custom text filter with an appropriate expression:

inArray(["2","5","9"],rowIndex.toString())

Select "true" in the facet and then "remove matching rows" to remove rows 3, 6 and 10 from the project.

Again I would emphasise - it's always better to remove a row (or edit a cell) based on explicit criteria that the row or cell fulfils - using the row.index is not what I'd recommend unless there is no other option. But when it is needed, it is possible to do it this way

1 Like

Thanks for your comment. This helps. I also figured out other ways to edit the content. IMO, I think they should purposely remove the edit button per cell to force you to make edits that are repeatable.