infosphere streams syntax

Hello ,
I’m trying to write a program on streams that will get a file and look for a string in the file
and if it found the string print the line that that string in to other file

I can’t find the wright syntax that will help me to find the line that the string is in and print the line.
This is the program but when i do the file==”Hii” it’s only print me the lines that are only “Hii” but i want to print all the lines that iclude “Hii”

namespace application ;

composite FileFilter

{

graph
(stream FileSource_1_out0) as FileSource_1 = FileSource()
{
param
format : line;
file : “file.txt” ;
}

() as FileSink_2 = FileSink(Filter_3_out0 as inputStream)
{
param
file : “second_file.txt” ;
}

(stream Filter_3_out0) as Filter_3 = Filter(FileSource_1_out0 as
inputStream)
{
param
filter : file == “Hii”;
}

}

Related:

Leave a Reply