title: Modify MinimalWordCount example to read from BigQuery
body: <p>I am trying to modify Apache Beam's MinimalWordCount python example to read from a BigQuery table.  I have made the following modifications, and I appear to have the query working but the example.</p>
  
  <p>Original Example Here:</p>
  
  <pre><code> with beam.Pipeline(options=pipeline_options) as p:
  
      # Read the text file[pattern] into a PCollection.
      lines = p | ReadFromText(known_args.input)
  
      # Count the occurrences of each word.
      counts = (
          lines
          | 'Split' &gt;&gt; (beam.FlatMap(lambda x: re.findall(r'[A-Za-z\']+', x))
                        .with_output_types(unicode))
          | 'PairWithOne' &gt;&gt; beam.Map(lambda x: (x, 1))
          | 'GroupAndSum' &gt;&gt; beam.CombinePerKey(sum))
  
      # Format the counts into a PCollection of strings.
      output = counts | 'Format' &gt;&gt; beam.Map(lambda (w, c): '%s: %s' % (w, c))
  
      # Write the output using a "Write" transform that has side effects.
      # pylint: disable=expression-not-assigned
      output | WriteToText(known_args.output)
  </code></pre>
  
  <p>Rather than <code>ReadFromText</code> I am trying to adjust this to read from a column in a BigQuery table. To do this I have replaced <code>lines = p | ReadFromText(known_args.input)</code> with the following code:</p>
  
  <pre><code>query = 'SELECT text_column FROM `bigquery.table.goes.here` '
  lines = p | 'ReadFromBigQuery' &gt;&gt; beam.io.Read(beam.io.BigQuerySource(query=query, use_standard_sql=True))
  </code></pre>
  
  <p>When I re-run the pipeline, I get the error: "<code>WARNING:root:A task failed with exception. expected string or buffer [while running 'Split']</code>"</p>
  
  <p>I recognize that the 'Split' operation is expecting a string and it is clearly not getting a string. How can I modify 'ReadFromBigQuery' so that it is passing a string/buffer? Do I need to provide a table schema or something to convert the results of 'ReadFromBigQuery' into a buffer of strings?</p>