I have a Hive external table with csv data in it. Some of the string fields have value as 'null'. Now, I want to select the data and insert into other table in ORC format with query like 'select * from first insert into second'. I want to replace the string 'null' with actual NULL value.
One solutions could be replace 'null' with blank and design my table to treat blank as null. That may work. But, if there are any blank values present in data, those will be also treated as NULL.
Other point comes to my mind is, the table has large number of columns with such strings.So if the solution requires to select a column and perform some operation; I will have to write a very long query. But if there is no other option, that can be done.
Please suggest a solution.