openrefine.org icon indicating copy to clipboard operation
openrefine.org copied to clipboard

Improve documentation of the cross function

Open wetneb opened this issue 2 years ago • 3 comments
trafficstars

The documentation of the cross function should be reviewed and improved:

  • [x] make sure the example expressions are correct (currently cell.cross("People","Name").cells["Address"].value[0], perhaps should be cell.cross("People","Name").cells["Address"][0].value instead?)
  • [ ] document the use of the cross function to access any cell of the current project (see this comment)
  • [ ] maybe more of the content from the wiki could be integrated in the docs directly

wetneb avatar Apr 13 '23 20:04 wetneb

  • [ ] Show that the result of cross() is actually an array and that the selection of one row can be done at multiple level (Owen's explanation).
  • [ ] Show an example with the join() function to get the data of many rows at the same time (Tom's suggestion).
  • [ ] Mention that cross() can access data INSIDE the current project.

I think these 3 points could also be added.

Regards, Antoine

antoine2711 avatar Apr 29 '23 15:04 antoine2711

Your third point seems to be redundant with my second point ^^. Deduplication is a hard problem!

wetneb avatar Apr 29 '23 15:04 wetneb

Your third point seems to be redundant with my second point ^^. Deduplication is a hard problem!

@wetneb : there is an overlap, but my 3rd point would be a single line in the doc that would stress that cross() can be used to do self join on the current project. It's just to explicitly state what could be deducted from previous information about the function.

For me, your 2nd point is really about the fats that ANY project can be an accessible indexed based Array for cross() (i.e. that with just the project name and the row number, you can extract any rows from any project).

I think those are 2 differents concepts that need to be explicitely said.

Regards, A.

antoine2711 avatar Apr 29 '23 15:04 antoine2711