Thanks a lot Joey. It works!!! On Thu, Jul 6, 2017 at 9:37 PM, Joey Frazee <[email protected]> wrote:
> Pavan, this sort of example might be helpful: > > https://gist.github.com/jfrazee/26deffba3a7d50e991495e223a020b93 > > The template and script show how to evaluate expressions when an attribute > is literal EL text. I think it might make more sense though to have > whatever downstream processors you have just have the > d_${dept}/${version}/csv expression in whatever properties they need it in. > > Best, > > -joey > > On Jul 6, 2017, 8:26 AM -0500, Pavan Challa <[email protected]>, wrote: > > > Hi, > I would like to know how to update flowfile Attributes in NiFi? > > my xml configuration file is as below. > > > 1. <configuration verbose="false" debugMode="false"> > 2. <dataFlows> > 3. <dataFlow> > 4. <properties> > 5. <dept>salary</dept> > 6. <version>1.0</version> > 7. </properties> > 8. <to> > 9. <path>d_${dept}/${version}/csv</path> > 10. </to> > 11. </dataFlow> > 12. </dataFlows> > 13. </configuration> > > from LookupAttributes (with XMLFileLookupService), I am able to extract > attributes like dept, version and path like below. > > dept: salary > > version: 1.0 > > path: d_${dept}/${version}/csv > > I have tried to use updateAttribute and create new attribute called > > to-path: ${path} > > but to-path is also giving value as d_${dept}/${version}/csv > > Can anyone help me to get to-path as d_salary/1.0/csv? > > -- > Thanks, > Pavan > > > > -- > Thanks, > Pavan > > -- Thanks, Pavan
