You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@nifi.apache.org by ph...@orange.com on 2016/04/18 16:51:52 UTC
DF design question
Hello
I have this simple Use Case to implement ( but it's not so clear for me which processors to put in the chain :)) :
I have JSON file with records identified by one type property {.......... "type": " smartphone"}, { ......... "type" : "PC" } , { ............ "type": "tablet"} .................
I want to route records based on the "type" property to different sink destinations .
Looking to routeText or routeContent procs , seems to be the right direction but I do not see how to route to multiple sinks .... ( 3 in my example ) :
I want records of "type": "smartphone" to be route to one sink ( first ElasticSearch processor with index1) , "type": "PC" on another sink ( 2nd ES processor) , and "type": "tablet' to a third ( 3rd ES processor)
A kind of demultiplexer to N sinks ....
Is it the right design (and processors ) to implement this DF , please? :)
Phil
_________________________________________________________________________________________________________________________
Ce message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees et ne doivent donc
pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce message par erreur, veuillez le signaler
a l'expediteur et le detruire ainsi que les pieces jointes. Les messages electroniques etant susceptibles d'alteration,
Orange decline toute responsabilite si ce message a ete altere, deforme ou falsifie. Merci.
This message and its attachments may contain confidential or privileged information that may be protected by law;
they should not be distributed, used or copied without authorisation.
If you have received this email in error, please notify the sender and delete this message and its attachments.
As emails may be altered, Orange is not liable for messages that have been modified, changed or falsified.
Thank you.
RE: DF design question
Posted by "aurelien.dehay@gmail.com" <au...@gmail.com>.
Hello.
I would use an evaluateJson processor to update an attribute rather than parse via a regexp the entire flowfile.
Then, I would the routeOnAttribute processor which creates one route per value of the attribute, plus one for the "unmatched" attribute.
BTW, you can reach me, by phone or mail or communicator), just search my name in the intranet.
Regards.
Aurélien DEHAY
________________________________
De : philippe.gibert@orange.com <ph...@orange.com>
Envoyé : lundi 18 avril 2016 16:51
À : users@nifi.apache.org
Objet : DF design question
Hello
I have this simple Use Case to implement ( but it's not so clear for me which processors to put in the chain :)) :
I have JSON file with records identified by one type property {.......... "type": " smartphone"}, { ......... "type" : "PC" } , { ............ "type": "tablet"} .................
I want to route records based on the "type" property to different sink destinations .
Looking to routeText or routeContent procs , seems to be the right direction but I do not see how to route to multiple sinks .... ( 3 in my example ) :
I want records of "type": "smartphone" to be route to one sink ( first ElasticSearch processor with index1) , "type": "PC" on another sink ( 2nd ES processor) , and "type": "tablet' to a third ( 3rd ES processor)
A kind of demultiplexer to N sinks ....
Is it the right design (and processors ) to implement this DF , please? :)
Phil