I want write Specified field from dataset to output file
I want write field 2 to output file
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", "|");
               }




--
View this message in context: 
http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/want-write-Specified-field-from-dataset-to-output-file-tp1223.html
Sent from the Apache Flink User Mailing List archive. mailing list archive at 
Nabble.com.

Reply via email to