Could someone help me in this scenario?
How to insert data into a Hive table by looking up values from other Hive table?
My input_source table is like below:
date key lines type
29-May 1 A A16
29-May 2 B D44
29-May 3 C K90
29-May 4 A L90
29-May 5 A J76
29-May 6 B Y78
I have detailed description of each of the types above. For example:
A and A16 is "Excellet"
B and D44 is "Average"
A and L90 is "Good"
B and Y78 is "Fair"
and so on..
During I insert the data into result table, I need to read the lines and type and insert the description in the final table as below:
date key desc
29-May 1 Excellent
29-May 2 Average
29-May 3 Not bad
29-may 4 Good
29-May 5 Fine
29-may 6 Fair
Could you please advice to achieve this?
Use Join. Here is what is probably needed.
Let me know if this helps!