You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@flink.apache.org by HarshithBolar <hk...@arity.com> on 2018/08/21 06:58:36 UTC

How to pass a dynamic path while writing to files using writeFileAsText(path)?

Let's say I have a Stream with elements of type `String`. I want to write
each element in the stream to a separate file in some folder. I'm using the
following set up.

    > filteredStream.writeAsText(path).setParallelism(1);

How do I make this path variable? I even tried adding `System.nanotime()` to
the path to make it variable. But it still doesn't seem to work, everything
gets written to a single file. 




--
Sent from: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/