Support Questions
Find answers, ask questions, and share your expertise

how to insert a column in hive table by taking unique values from 5 different column in another hive table.



I have a hive table with the below schema.

Table A:

li_number string

id1 string

id2 string

id3 string

id4 string

id5 string

id6 string

id7 string

id8 string

id9 string

id10 string

created_date date

Table B:

id string

created_date date

From table A, i need to take unique id's from id1 to id10 and load them in table B id column. Also i need to load created date column with the current date of loading

I have achieved the same using an shell script and load statement of hive. but i need this to be done using only hive. Please help me.