I have to some query and creat columns operations in HiveQL.
For example,
app col1
app1 anybody love me?
app2 I hate u
app3 this hat is good
app4 I don't like this one
app5 oh my god
app6 damn you.
app7 such nice girl
app8 xxxxx
app9 pretty prefect
app10 don't love me.
app11 xxx anybody?
I want to match a keyword list like ['anybody', 'love', 'you', 'xxx', 'don't'] and select the matched keyword result as a new column, named keyword as follows:
app keyword
app1 anybody, love
app4 I don't like this one
app6 damn you.
app8 xxx
app10 don't, love
app11 xxx
It seems that I have to use nested query.
The logic is kind of like selecting the matched result rows and setting a matched results which should be saved in a list or something like this as a new column.
But I am not familiar enough with the HiveQL.
Could anyone help me?
Thanks in advances.