title: Apache beam write each tagged output to separate file
body: <p>I tag input elements based on one of input data elements(date).</p>
  
  <pre><code>class TagElementsWithDate(beam.DoFn):
      def process(self, element):
          dt = element['date'].replace('-', '')[:6]
          yield pvalue.TaggedOutput(dt, element)
  
  input_data = p | 'Read Input' &gt;&gt;  beam.io.Read(beam.io.BigQuerySource(query='select id, date from `project.dataset.tablename`', use_standard_sql=True))
  
  tagged_data = input_data | 'tag data' &gt;&gt; beam.ParDo(TagElementsWithDate()).with_outputs()
  </code></pre>
  
  <p>tagged_data is DoOutputsTuple. I'm looking to iterate this and write each tagged data to a separate file.</p>