(Tested using Kettle 5.0.1)
I leave out ROWNUMBER as it is irrelevant to your question.
Don't forget to register parameter named "currUser" in transformation settings.
The last step also removes column TYPE.
code of JS step:
if(TYPE == "data") {
USER = getVariable("currUser",0);
} else {
USER = PAYLOAD;
setVariable("currUser",PAYLOAD,"p");
}
settings of JS step:
- Fieldname: USER
- Type: String
- Replace value: Y
From data grid content to execution results: