While Beam now supports file-based sinks that can depend on the current window, I've seen interest in value-dependent sinks as well (and there's a long-standing JIRA for this). I wrote up a short API proposal for this for discussion on the list.
https://docs.google.com/document/d/1Bd9mJO1YC8vOoFObJFupVURBMCl7jWt6hOgw6ClwxE4/edit?usp=sharing Reuven
