Hi all,
Need help to build a logic, where I am taking two input files with few common fields.
I want to build a logic to populate these common fields with below condition while joining the files -
if <condition> update field with data from file 1 else take data from file 2.
Appreciate any guidance.
Thanks
Solved! Go to Solution.
Can you provide a sample input and output?
Hey @Sakshi_M,
Could you give an example inputs and output datasets? I'm not 100% on what kind of conditions you want to apply and how it should look.
@IraWatt @Qiu
file1_Col_1 | file2_col1 | |
1 | a | |
2 | ||
3 | b | |
4 | ||
5 | c | |
6 | ||
7 | d | |
8 | ||
9 | ||
10 | ||
11 | f | |
12 | ||
13 | ||
14 | ||
15 | ||
16 | ||
17 | ||
18 | ||
19 |
So I have above 2 columns with same name coming from file1 and file2.
When I join both the files I want that the values for Col1 should be picked from file2 and for all null values remaining should be filled from file 1. The output should look like this:
output_col1 |
a |
2 |
b |
4 |
c |
6 |
d |
8 |
9 |
10 |
f |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
Hi @Sakshi_M ,
Find a test attached with exact desired output.
Let us know if it works as you want.
Cheers !
Thanks @Emmanuel_G and @grazitti_sapna! Both worked like a charm.
@Sakshi_M Glad to know that ! 🙂