Hi, which version of Flink are you using? Since 0.8.0, Flink supports disjoint dataflows ( https://issues.apache.org/jira/browse/FLINK-820).
On Sun, May 10, 2015 at 6:11 PM, hagersaleh <loveallah1...@yahoo.com> wrote: > Exception in thread "main" org.apache.flink.compiler.CompilerException: > The > given program contains multiple disconnected data flows > > example > DataSet<Customer3> > customers=env.readCsvFile("/home/hadoop/Desktop/Dataset/customer.csv") > .fieldDelimiter('|') > .includeFields(11000010).ignoreFirstLine() > .tupleType(Customer3.class); > customers = customers.filter(new > FilterFunction<Customer3>() > { > @Override > public boolean filter(Customer3 c) { > > > c.getField(2).toString().equals("AUTOMOBILE"); > } > return true; > > } > }); > customers.print(); > > customers.writeAsCsv("/home/hadoop/Desktop/Dataset/out2.csv", "\n", "|"); > } > > > DataSet<Customer2> > customers1=env.readCsvFile("/home/hadoop/Desktop/Dataset/customer.csv") > .fieldDelimiter('|') > .includeFields("10000010").ignoreFirstLine() > .tupleType(Customer2.class); > customers = customers.filter(new > FilterFunction<Customer2>() > { > @Override > public boolean filter(Customer2 c) { > > c.getField(1).toString().equals("MACHINERY"); > } > > }); > > customers1.print(); > > > customers1.writeAsCsv("/home/hadoop/Desktop/Dataset/out1.csv", "\n", "|"); > > > > -- > View this message in context: > http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/Error-when-use-tow-datasink-tp1205.html > Sent from the Apache Flink User Mailing List archive. mailing list archive > at Nabble.com. >