Hi,

I’m not sure I fully understand the question, as you say that “customers” have 
attributes, but I was under the impression that the customers were various 
processors/“endpoints”. Flowfiles are the atomic units of data passing through 
the flow, and that is where attributes are stored.

Regardless, to perform complex string comparisons, I believe your best option 
is an ExecuteScript processor. In any of the supported languages, you can 
quickly parse the attributes into collections (i.e. java.util.List) via String 
split on delimiter, perform set arithmetic (A - B), and then route based on the 
results.

Andy LoPresto
[email protected]
[email protected]
PGP Fingerprint: 70EC B3E5 98A6 5A3F D3C4  BACE 3C6E F65B 2F7D EF69

> On Apr 6, 2017, at 7:58 AM, Pompilio Ramirez <[email protected]> wrote:
> 
> Hello,
> 
> I cant find a way to take 2 attributes and create an attribute with only the 
> difference between them.
> 
> Has anyone accomplished that? In general want to define routing to processing 
> groups that do things. I want to define end points ( say customer1 / 
> customer2  / customer3 )
> I get one flowfile and I define what the customer(s) need to normalize the 
> data using advance update attribute.
> 
> So flowfile condition is met and I build attributes under actions:
> 
> So I enrich flowfile with attribute:
> 
> So customer1 would have an attribute "ACTIONS" that says ( convert / merge / 
> enrich / convert )
> Customer2 has "ACTIONS" ( convert / merge / gzip )
> Customer3 has "ACTIONS" ( convert / merge  )
> 
> I then want to take that flowfile and have logic that says all customers need 
> convert / merge so I'll take that flowfile and do convert ( this is very 
> expensive ) ( or do all the common steps as one flowfile ) before they clone.
> 
> Knowing my steps are linear so just want to find a way to build logic to know 
> my common steps and create attributes with the difference.
> 
> thoughts?

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail

Reply via email to