Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
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", "|"); } |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
Hi, please have a look at the programming guide on how to write results to an output file: http://ci.apache.org/projects/flink/flink-docs-master/apis/programming_guide.html#data-sinks In your case, I would recommend:
On Tue, May 12, 2015 at 9:20 AM, hagersaleh <[hidden email]> wrote: I want write Specified field from dataset to output file ... [show rest of quote] |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
when use the solve display error message
cannot find symbol new TextFormatter<Customer2>() { symbol: class TextFormatter location: class TPCHQuery3 Note: /home/hadoop/Desktop/sub_query/src/org/apache/flink/examples/java/relational/TPCHQuery3.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. 1 error1 warning |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
I solve error when use import org.apache.flink.api.java.io.TextOutputFormat.TextFormatter;
very thanks |
Free forum by Nabble | Edit this page |