Hi There, I am trying to write a CSVsink to disk but it's not getting written. I think the file is getting overwritten or truncated once The Stream process finishes. Does anyone know why the file is getting overwritten or truncated and how can i fix this ?
tableEnv.registerDataStream("table", watermarkedStream) val results = tableEnv.sqlQuery( """ |SELECT | A | FROM table """.stripMargin) val result: Table = results val path = "file:///path/test/1.txt" val sink :TableSink[Row]= new CsvTableSink( path, // output path fieldDelim = "|", // optional: delimit files by '|' numFiles = 1, // optional: write to a single file writeMode = WriteMode.NO_OVERWRITE) result.writeToSink(sink) env.execute("this job") Thanks