I have a data frames(df1) with two columns(e.g. A and A_NEW). A is supposed to be a default join key between df1 and another data frame (df2). I want to join df1 and df2 in a way that if there is no match between df1.A and df2.key, then join based on df1.A_NEW and and df2.key. Imagine following scenario:
It means value of join attribute could be either in df1.A or df1.A_NEW but our priority is df1.A. If there is no match between df1.A and df2.key, then df1.A_NEW should be checked with df2.key.
I appreciate if you could help me with inner join and left outer join scenarios.