There are two columns with headings "new image Name" and "source image Name". The new images are derived from source images. Also, occasionally, images are created from existing images as well. Please see sample data below.
new image Name | source image Name
----------------------------------
image1 | baseline
image2 | baseline
image3 | image1
image4 | baseline
image5 | image3
image6 | imageX
Observations:
From above table, we see that "image3" is derived from "image1" which is derived from "baseline".
For "image5" in col1, it is derived from "image3", which in turn is derived from "image1".
For "image6" in col1, it is derived from "imageX" which can be an "Unknown" source
Requirements:
Wherever we see that it is not "baseline" in col2, we need to check if corresponding value exists in col1 and populate its col2 value.
If we get "baseline" as output, then we need to mark it "baseline"
If we get another image name as the col2 value, then we need to mark it "Unknown"
If we get an imageX as the col2 value, then we need to mark it "Unknown"
Final result:
new image Name | source image Name
----------------------------------
image1 | baseline
image2 | baseline
image3 | baseline
image4 | baseline
image5 | Unknown
image6 | Unknown
Please help.
... View more