Support Questions

Find answers, ask questions, and share your expertise

Parsing message in NIFI

avatar
Expert Contributor

I need to parse location sensor messages; instead of processing in Spark, i would like to try out in NIFI (HDF2.0), the messages are simple . I just need to split the content with ',' and then tranform it.

I couldn't find the right process in NiFi, can you please help me on that?

Thanks,

SJ

1 ACCEPTED SOLUTION

avatar

I'd suggest checking out the SplitContent processor[1]. Just set "Byte Sequence" to what you want to split it on (','). Then you can process each split as it's own FlowFile.

[1] https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi.processors.standard.SplitContent/i...

View solution in original post

3 REPLIES 3

avatar

I'd suggest checking out the SplitContent processor[1]. Just set "Byte Sequence" to what you want to split it on (','). Then you can process each split as it's own FlowFile.

[1] https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi.processors.standard.SplitContent/i...

avatar
Expert Contributor

Hi ,

Thanks for the help. I applied the "splitContent" and now it split the message by ','.

SJ

avatar
Expert Contributor

I lost my project and now again when i want to split the text based on the ',' doesn't work, Not sure if in the version of nifi(1.1) this feature has been changed. Please find my config in the attachment. It gives me an error that ',' is not a valid hex content.

untitled.png

thanks, SJ