Ask Your Question

Filter File Tail records on the edge

asked 2018-09-20 09:58:24 -0500

Tom gravatar image

updated 2018-09-20 14:12:18 -0500

Hi StreamSets community,

I’m working on some tests of SDC and SDC Edge. Thereby, I’m experiencing problems with the filtering of data on the edge node and hope that you can give some helpful advice.

I’m using the File Tail processor to read an active file. A new data record is appended every 100ms to this file. The appended record is structured in a CSV style and the first line of the file contains the schema information. Here an example of the first three records (Dataset):


I want to filter the dataset for entries that have the following characteristics:

X1_ActualPosition == 198 (1st field)

M1_CURRENT_PROGRAM_NUMBER != 0 (45th field)

X.M1_CURRENT_FEEDRATE == 50 (47th field)

Is there a way to turn the text formatted output of the File Tail processor into a CSV formatted output, so that it can be filtered with a stream selector processor?

My current pipeline:

image description

I would like to use the following condition in the stream selector processor:

${record:value('/X1_ActualPosition') == 198 && record:value('/M1_CURRENT_PROGRAM_NUMBER') != 0 && record:value('/X.M1_CURRENT_FEEDRATE') == 50}

Thank you,


edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2018-09-21 08:10:54 -0500

madhu gravatar image

Currently Delimited data format is not supported in Edge for File Tail Origin. We are planning to add the support soon -

Also in upcoming release we have added support for new string EL in edge to split the string - ${str:split(record:value('/text'), ',')}. So you can use expression evaluator processor to split the string value from file tail origin.

Expression Evaluator: /fields - ${str:split(record:value('/text'), ',')}

Stream Selector Processor: Lane 1 - ${record:value('/fields[0]') == "198" && record:value('/fields[45]') != "0" && record:value('/fields[50]') == "50"}

image description

image description

image description

edit flag offensive delete link more


Hi Madhu, thank you for your answer! Do you know when the new release will be published? I tried to build 3.5 on my own, but I ran into a lot of issues... Thanks, Tom

Tom gravatar imageTom ( 2018-09-22 03:49:57 -0500 )edit

Hi Tom, We are planning to release 3.5 soon (in one or two weeks). Try using 3.5 RC2 build - Also please share the issues you are facing with build, I can help you out.

madhu gravatar imagemadhu ( 2018-09-22 12:32:19 -0500 )edit

Hi Madhu, thanks for pointing out the nightly builds! I used the tarball and exported the executable from the StreamSets UI. It works like a charm! Thank you very much!

Tom gravatar imageTom ( 2018-09-23 07:05:38 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2018-09-20 09:57:30 -0500

Seen: 243 times

Last updated: Sep 21 '18