Skip to content

Enhance cross() with empty "project name" calling parameter to represent the current project and empty column name to represent the index #2504

@antoine2711

Description

@antoine2711

Is your feature request related to a problem or area of OpenRefine? Please describe.
The cross() function can get data from an external project, but also from the current project (kind of a self-join). In order to minimize the text to write (and read), if the project name parameter could be set to an empty string, it would help or visibility, and for reusability, as the SAME transformation formula can be used in 2 different projects that share some data structure (or on the same project that would have changed name since).

Also, in order to be able to do a cross with the index of the row, I would let empty value for the column name. In that case, the value (first parameter of cross()) should be of type number.

Describe the solution you'd like
if cross() is called with an empty project name, then it should mean that the current project is the one to use. Ex.: cross(1, "", "ID")[0].
if cross() is called with an empty column name, then the cross should be done not with a column, but with the internal index of the row, in a numerical match.

Describe alternatives you've considered
Writing the full column name, like now. Creating a column in the related project with the index as the value of each row.

Metadata

Metadata

Assignees

Labels

Type: Feature RequestIdentifies requests for new features or enhancements. These involve proposing new improvements.cross/joinAbout the cross function, which makes it possible to retrieve data from other projects by joininggrelThe default expression language, GREL, could be improved in many ways!

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions