I am using SQL with pyspark and hive, and I'm new to all of it. I have a problem in my hands that I don't know how to solve.
If I have a table "People" , like this:
id | name | other_names
1 | Alice | Sarah;Tom
2 | Bob | Jane;Michael;Ben
3 | Lizzie | John
The number of names in "other_names" column is variable. It can be 1,2,3,....
I want to create a query to obtain this:
id | name
1 | Alice
1 | Sarah
1 | Tom
2 | Bob
2 | Jane
2 | Michael
2 | Ben
3 | Lizzie
3 | John
Is there a not too complicated way to do this?
Thank you so so much in advance, and happy coding :D