@AbhishekSingh It looks like the issue with the Replace Expression Language was just the ` around the database and table name. That works for me as follows:
${query:replace('`nrpuserorgdb2306`.`status`', '`nrpreportdb`.`user_org_status`')}
Here is my flow to test:
Notice the use of a simple flow to test the concept. I also set query in GenerateFlowfile and define a separate query2 in UpdateAttribute. I always work in ways that prove functionality, then when the concept is working, take the lesson learned into real flows.
Some additional Screen Shots:
Template and Flow Definition File on my GitHub:
https://github.com/cldr-steven-matison/NiFi-Templates