29.3.20

Concatenate Column in OpenRefine 3.0 and 3.3


We all know the pain of merging different columns in OpenRefine when you have null values. Before version 3.0, it required writing a complex GREL expression or managing multiple filters to ensure we are not losing any data. 

Those shortcomings have been addressed in the latest version! 

Starting OpenRefine 3.0, we have the coalesce() function:  which natively handles the null correctly. 

But evermore importantly, OpenRefine 3.3 introduced a user interface that offers tons of flexibility, including defining how you want to concatenate one or multiple columns together. 

I recorded a quick video demonstration: 




The function is available under Edit Columns > Joins Columns ...



Through the interface, you can:
  • Define the Separator between the content of each column:
  • Replace nulls with… 
  • Skip nulls.
  • Support new lines, line break and tabulation: \n \t \\n \n \\t \t.