title: Reading JSON file with BigQuery to make table
body: <p>I'm new to Google Dataflow, and can't get this thing to work with JSON. I've been reading throughout the documentation, but can't solve my problem.</p>
  
  <p>So, following the WordCount example i figured how data is loaded from .csv file with next line</p>
  
  <pre><code>PCollection&lt;String&gt; input = p.apply(TextIO.Read.from(options.getInputFile()));
  </code></pre>
  
  <p>where inputFile in .csv file from my gcloud bucket. I can transform read lines from .csv with:</p>
  
  <pre><code>PCollection&lt;TableRow&gt; table = input.apply(ParDo.of(new ExtractParametersFn()));
  </code></pre>
  
  <p>(Extract ParametersFn defined by me). So far so good! </p>
  
  <hr>
  
  <p>But then I realize my .csv file is too big and had to convert it to JSON (<a href="https://cloud.google.com/bigquery/preparing-data-for-bigquery" rel="nofollow">https://cloud.google.com/bigquery/preparing-data-for-bigquery</a>). 
  Since BigQueryIO is supposedly better for reading JSON, I tried with the following code:</p>
  
  <pre><code> PCollection&lt;TableRow&gt; table = p.apply(BigQueryIO.Read.from(options.getInputFile()));
  </code></pre>
  
  <p>(inputFile is then JSON file and the output when reading with BigQuery is PCollection with TableRows) I tried with TextIO too (which returns PCollection with Strings) and neither of the two IO options work. </p>
  
  <p>What am I missing? The documentation is really not that detailed to find an answer there, but perhaps some of you guys already dealt with this problem before? </p>
  
  <p>Any suggestions would be very appreciated. :) </p>