Skip to content
Advertisement

Duplicate a row based in a column that has 2 values in spark sql

I have a temporary view that looks like this.

What I want is to duplicate a row by adding an ‘All’ value to Activity

Expecting result would be:

I tried to create it through Zeppelin, but I am not able to update a view.

Is there any way to do it please ?

I can only use SQL unfortunately

Thanks in advance for your help

Advertisement

Answer

You can use union

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement