Openrefine: Change the behavior of "Edit cells > copy reconciliation data" feature

Created on 18 Sep 2019  Â·  12Comments  Â·  Source: OpenRefine/OpenRefine

Is your feature request related to a problem or area of OpenRefine? Please describe.

The "Edit cells > copy reconciliation data" is the only menu in OR that copy values in an other column, instead of creating new column. I suppose the only way to use this feature is a manual workflow with 2 steps :

step 1 : create a new column with the values of the source column (column -> create new colum...)
step 2 : copy recon data to that new column.

That would explains why the underlying values of source and destination columns have to be the same.

So would you agree to see this menu creating a new column instead of copying recon data to a new column? The user will be asked the name of the column to create, then this column will be created with a copy of "ordinary" values of source column, then the recon data will be copied to that new column.

This menu could be moved under "Edit column", just under "add columns from reconciled values", to make the difference between the two features clear for the user.

After that we could add a 3rd menu under "Edit colum" for copying the ID of a reconciled cell in a new column (see https://github.com/OpenRefine/OpenRefine/issues/2114).

The wording of those feature could be improved to be coherent and understandable for the user

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

documentation reconciliation

Most helpful comment

OMG but it already works!
Try to apply "cell" when you copy to a new colum

{
"op": "core/column-addition",
"engineConfig": {
"facets": [],
"mode": "row-based"
},
"baseColumnName": "Column 1",
"expression": "grel:cell",
"onError": "set-to-blank",
"newColumnName": "xxx",
"columnInsertIndex": 1,
"description": "Create column xxx at index 1 based on column Column 1 using expression grel:cell"
}

image

All 12 comments

I agree this operation is confusing.

However, I am not sure I would change it to creating a new column. My instinct would be to just remove the need for the cell values to be equal.

Forcing this operation to create new columns would probably hinder workflows where users would apply the operation (in its current form) to a filtered set of rows (say, to transfer a set of matched cells where the matching was done with high confidence).

In any case, if we do any change to the operations' behaviour, we should think about how to preserve the behaviour of previous workflows (so, potentially, creating a new operation with a different JSON id, and keeping the current operation for a while in the backend).

Actually, as a user I would just like to be able to "create a column based on this column" with the GREL expression cell (or cells["my column"]) which would copy the entire cell (including the reconciliation field) and not just the cell value.

I think that would be a fairly simple change to implement, and it should not break existing workflows (since at the moment the result of such an operation isn't particularly useful).

Do you mean something like that ?

image

I am not sure about the [value,copyreconciliationdata=true] bit… why isn't just cell enough?

OMG but it already works!
Try to apply "cell" when you copy to a new colum

{
"op": "core/column-addition",
"engineConfig": {
"facets": [],
"mode": "row-based"
},
"baseColumnName": "Column 1",
"expression": "grel:cell",
"onError": "set-to-blank",
"newColumnName": "xxx",
"columnInsertIndex": 1,
"description": "Create column xxx at index 1 based on column Column 1 using expression grel:cell"
}

image

Hahaha awesome! Well, I guess we need to better document and expose this in the UI :)

And release it as a new feature ^_^

@msaby We have had all of GREL's variables documented since the beginning...including cell.
https://github.com/OpenRefine/OpenRefine/wiki/Variables

@thadguidry yes, but it's not clear that cell can be used on its own as a GREL script: that is not implied by the docs AFAICT.
In particular that is not implied by the preview, I think (as far as I can remember it shows [object Cell] or something like that.

@wetneb Yes, you are right, it shows the object, not the fields and values that are held in the objects. So yeah, this is probably a good RECON doc improvement to inform folks how to just use cell to copy over all the fields of the cell (including the recon etc.) for their copying use case. (this also tripped up Graham from British library on our mailing list and would benefit from this new knowledge)

@msaby Do you mind improving the RECON doc's somewhere? Check with Antonin on where.

Now that we we know that "cell" can copy the values and the recon status, maybe the "Edit cells > copy reconcilation data" could be removed from the UI? But we should ask the mailing list before.

I will try to make changes to the page https://github.com/OpenRefine/OpenRefine/wiki/Variables

All, I have fixed this issue and updated the wiki page https://github.com/OpenRefine/OpenRefine/wiki/Variables#Cell
Take a look now.
So can we all agree that this issue can be closed now, along with #2114 ? or is there more to do and we can open a new issue for whatever specific enhancements remain?

Was this page helpful?
0 / 5 - 0 ratings