'Is there a way to remove the special meaning of "\t" in HiveQL?

I have a hive table (table_1) that has a column (column_1) that contains values of the form "some_string \t some_other_string".

When I do,

SELECT column_1 
FROM table_1;

string after "\t" is shifted to the right to a new column. Is there a way to avoid this? Is there a way to get the entire "some_string \t some_other_string" in the first column itself?

I have tried replacing "\t" with "\\\\t" and it works.

SELECT regexp_replace(column_1,"\t","\\\\t")
FROM table_1;

I would like to find out if there are any other ways of handling this?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source