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

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

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

HarshithBolar
This post was updated on .
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 dynamic? I even tried adding `System.nanotime()` to
the path to make it dynamic. 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/