Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

How can I parse through a txt file that's ":" delimited and set values to flowfile attributes?

Highlighted

How can I parse through a txt file that's ":" delimited and set values to flowfile attributes?

New Contributor

I have a txt file (attached) and I would like split the lines and to parse out the data and set the values to flowfile attributes (PPGRAW : 1.76, PPGCORR : 5.15, etc.). Ideally I would like to just get the very last row of values (ignoring the last couple rows of "878 LOG,STOP" and ignoring that first numeric value separated by the space) and set those values to flowfile attributes accordingly.

I was able to split the original text file by line to include headers (first image). I can split them to not include the headers (since I already know which values are for which properties - second image). My flow consists of GetFile -> SplitText for now.

m6_sample.txt

109872-1562944540771.png

109843-1562944779810.png

Don't have an account?
Coming from Hortonworks? Activate your account here