Created 07-22-2016 08:51 AM
Hello
I am using Nifi to ingest my hdfs cluster with emails (.msg) and i want to be able to extract custom attributes these emails have like (From, To, Title etc..). How should i approach this?
I also want to create directories in my hdfs destination through nifi based on these attributes. Is this possible?
Thanks
Ahmad
Created 07-23-2016 01:58 AM
You could use existing processors such as ExtractText for some types of emails to extract attributes which you can then use for routing. Or you could use the scripting processors and write your own code to extract features of the emails as attributes then use RouteOnAttribute. In the NiFi community there was recently work merged https://issues.apache.org/jira/browse/NIFI-1899 which looks like it will help a lot. For now, probably the best approach is to use ExecuteScript or InvokeScript to put together a quick e-mail parsing processor.
Thanks
Created 07-23-2016 01:58 AM
You could use existing processors such as ExtractText for some types of emails to extract attributes which you can then use for routing. Or you could use the scripting processors and write your own code to extract features of the emails as attributes then use RouteOnAttribute. In the NiFi community there was recently work merged https://issues.apache.org/jira/browse/NIFI-1899 which looks like it will help a lot. For now, probably the best approach is to use ExecuteScript or InvokeScript to put together a quick e-mail parsing processor.
Thanks
Created 07-23-2016 06:01 AM
Thank you for your answer. These attributes are part of the metadata of the .msg file. Shouldn't the updateattributes processor be able to extract them? i tried it but it didnt work.