Reputation: 67
I want to remove double quote ("") from a particular column of a table in hive when I query it.
|Kine|anti "illicit"|reuse|precious|..... When I query the Hive table, I want to remove the double quote in the 2nd column. And for it to be in this form... |Kine|anti illicit|reuse|precious|
Please help.
Upvotes: 1
Views: 333
Reputation: 38325
Using regexp_replace
:
select regexp_replace(landmark , '["]', '') as landmark
If you want to remove tab, newline, double-quote and pipe:
select regexp_replace(landmark, '["\t\n|]', '') as landmark;
Upvotes: 1