I am joining tbl_A
to tbl_B
, on column CustomerID
in tbl_A
to column Output
in tbl_B
which contains customer ID
. However, tbl_B
has all other information in related rows that I do not want to lose when joining. I tried to join
using like
, but I lost rows that did not contain customer ID
in the output column.
Here is my join query in Hive:
select a.*, b.Output from tbl_A a
left join tbl_B b
On b.Output like concat('%', a.CustomerID, '%')
However, I lose other rows from output.