Mark, How do we currently resolve situations where an attribute and a variable have the same name? The attribute is applied first, correct? (Applies to property descriptors that are scoped for attributes)
Andy LoPresto [email protected] [email protected] PGP Fingerprint: 70EC B3E5 98A6 5A3F D3C4 BACE 3C6E F65B 2F7D EF69 > On May 16, 2019, at 18:21, Mark Payne <[email protected]> wrote: > > We could probably handle this without the user interface changing. The > processor could be smart enough to determine the proper ordering to evaluate > the properties based on whether or not it references another property. For > example if properties are: > > first.name = John > last.name = Doe > greeting = Hello, ${full.name} > full.name = ${first.name} ${last.name} > > The processor does not currently order these in any ways. But it could be > improved to determine that full.name must be evaluated before greeting and > both first.name and last.name must be evaluated before full.name. > > That way users wouldn’t have to manually order anything. If there were a > circular reference then the order could remain indeterminate and 2 processors > could be used. > > -Mark > > Sent from my iPhone > > On May 16, 2019, at 8:03 PM, Andy LoPresto <[email protected]> wrote: > >> You have to do this in two subsequent UpdateAttribute instances because the >> order of attribute definition (within an instance) is not deterministic. We >> have gotten a lot of questions about this, so perhaps it makes sense to >> investigate as a new feature. However, if that decision is made, I think >> substantial changes to the interface would need to be made to allow for >> manual reordering of property descriptors, which is not currently supported, >> and the transmission of that data via the DTOs in the API would need to be >> changed as well, because JSON keys are not ordered. >> >> Andy LoPresto >> [email protected] >> [email protected] >> PGP Fingerprint: 70EC B3E5 98A6 5A3F D3C4 BACE 3C6E F65B 2F7D EF69 >> >>> On May 16, 2019, at 2:08 PM, Boris Tyukin <[email protected]> wrote: >>> >>> Hi guys, >>> >>> is it possible to reuse just defined attribute in another attribute in the >>> same instance of UpdateAttribute processor or I really have to use two >>> separate UpdateAttribute processors? >>> >>> For example, I define name=boris and then I want to add another attribute >>> greetings=Hi ${name} >>> >>> If I do it in NiFi 1.9, greetings attribute is set to "Hi " >>
