Support Questions

Find answers, ask questions, and share your expertise

nifi dertermine charset of flowfile

avatar
Expert Contributor

Hi

Is there a way in NIFI to dertermine the charset of a flowfile, and store the value in a attribute

We want to make sure that all our file are stored on hadoop with a certain charset.

Best Regards

1 REPLY 1

avatar
Master Guru

I don't currently see a processor that would do this for you, but if you are comfortable with a scripting language such as Groovy, Javascript, or Clojure, you could use ExecuteScript with any of these libraries to infer the character set for an incoming stream. For more information on including these library JAR(s) in your ExecuteScript configuration, see my ExecuteScript Cookbook (part 3) and/or my separate blog post. Since this seems like a good feature to have in NiFi proper, I have created a Jira (NIFI-4550) to add an InferCharacterSet processor.