I want to split the name column into 2 columns where there are many hiphens(-) in the name but I want to split from the last hiphen(-) in MySQL in hive db.
for example check the check the below table
name | age | gender |
---|---|---|
a-b-c-d_b | 23 | M |
d-e-f-g_e | 44 | F |
I want the output to be like splitting the name column with only last (-)
So the output table should be like the one below
name | new_name | age | gender |
---|---|---|---|
a-b-c-d_b | d_b | 23 | M |
d-e-f-g_e | g_e | 44 | F |