1

I have 2 input types of data coming from file -

Data 1 contains the Attribute and Value pair. Currently it has 4 attributes with value but, this could be contain more attributes value pair depending on the input. The attribute name would be same as the column/Field name found in Data 2.

Data 2 contains user details information with user attribute column named i.e. UA1,UA2,UA3,UA4,UA5 etc

Is there a way get the expected result via PDI Kettle the way it is shown in the attached picture i.e. to compare attribute row of the data 1 with the same attribute column name of data 2 and append the values to generate the expected output?

I tried Merge Join step in kettle but, it doesn't seems to work.

enter image description here

vish
  • 29
  • 4

1 Answers1

1

In PDI, there have no built-in step to achieve this. You need to get help from "User defined java class". I have prepared a solution for you Here. You can get help from this.

There are 3 file,

  1. RunTrans.ktr- I get mapping data here "Data1"
  2. ForOnlyLoop.kjb- Use for only looping and set variable purpose.
  3. CompareAndResult.ktr- I get details data here "Data2" and compare.
  4. Output will be found in a text file.

My solution gives you dynamic exact result based on both Data1 and Data2.

Ahmmed
  • 1,038
  • 1
  • 5
  • 13