title: Writing JSON data into BigQuery table as just one field of type string
body: <p>My input data looks like this:</p>
  
  <pre><code>[someGarbagevalue]{"Id": 1, "Address": {"Street":"MG Road","City":"Pune"}}
  [someGarbagevalue]{"Id": 2, "Address": {"City":"Mumbai"}}
  [someGarbagevalue]{"Id": 3, "Address": {"Street":"XYZ Road"}}
  [someGarbagevalue]{"Id": 4}
  [someGarbagevalue]{"Id": 5, "PhoneNumber": 12345678, "Address": {"Street":"ABCD Road", "City":"Bangalore"}}
  </code></pre>
  
  <p>I am striping the <code>[someGarbagevalue]</code> after reading the data as and then trying to write to BigQuery:</p>
  
  <pre><code>class processFunction(beam.DoFn):
    def process(self, element):
      global line
      line = element[element.find(']') + 1:].strip()
      return [line]
  
  def run(argv=None):
      pipeline_options = PipelineOptions()
      p = beam.Pipeline(options=pipeline_options)
        first = p | 'read' &gt;&gt; ReadFromText(wordcount_options.input)
        second = (first
                  | 'process' &gt;&gt; (beam.ParDo(processFunction()))
                  | 'write' &gt;&gt; beam.io.WriteToBigQuery(
                    'myBucket:tableFolder.test_table')
  </code></pre>
  
  <p><strong>Question</strong>: </p>
  
  <ol>
  <li>How can I write the data to BigQuery as each <code>line</code> of type
  <code>STRING</code>.   </li>
  <li>How would I query the BigQuery Table if I write the data to BigQuery as each line?</li>
  </ol>
  
  <p>Current error:</p>
  
  <pre><code>Error while reading data, error message: JSON table encountered too many errors, giving up. Rows: 1; errors: 1. Error while reading data, error message: JSON parsing error in row starting at position 0: Value encountered without start of object.
  </code></pre>