How to grab value from DB table and use that value to replace another field in Pentaho

53 Views Asked by At

I'm currently using a table input step that runs a sql to extract data. I have another text file input stream and I need the data from the table input step to replace one of the field values in the text file input. How would I go about doing that?

I've tried merge joins but it doesnt get me the result expected as it tends to lose some of the data.

1

There are 1 best solutions below

0
Bert-Jan Stroop On

Easiest way is to see the textfile input flow as your main flow, then in that main flow add a stream lookup which retrieves data from a table input step based on a common key (to make sure the correct records are joined). This way you can get the database field in the same record as the text flow.

From there you can then make a formula-step to pick the prefered one of the two, based on logic, or if it should always overwrite just use a "set field value" step.