I want to take a json file and map it so that one of the columns is a substring of another. For example to take the left table and produce the right table:
------------ ------------------------
| a | | a | b |
|------------| -> |------------|---------|
|hello, world| |hello, world| hello |
I can do this using spark-sql syntax but how can it be done using the in-built functions?