flink-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Abdul Salam Shaikh <abd.salam.sha...@gmail.com>
Subject Writing the results of the stream onto a CSV File
Date Fri, 28 Apr 2017 09:18:37 GMT
Hi,

I am trying to write the results of my stream into a CSV format using the
following code and it has compilation issues:

DataStream<DetectorStatistics> objectStream = windowedStream.flatMap(new
WindowObjectStreamTransformer());
        objectStream.writeAsText("H:\\data.csv", new
TextFormatter<DetectorStatistics>() {
            public String format (DetectorStatistics value) {
                return value.getDetectorId() + " ," +
value.getActualPhaseTime() ;
            }
        });

​What am I doing wrong here ? Or is there an alternative way to write
records onto a CSV file ? ​

​Thanks!

Mime
View raw message