I would like to see if I can split a column in spark dataframes. Like this,
Select employee, split(department,"_") from Employee
Try this:
SELECT explode(split(str, '_'))
Or this:
SELECT split(str, ' ')[0] as part1, split(str, ' ')[1] as part2
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With