p.apply( "ReadNonFlattened", BigQueryIO.readTableRows().fromQuery(options.getInput()).withoutResultFlattening()); PCollection<TableRow> unflattenableCollection = p.apply( BigQueryIO.readTableRows() .fromQuery(options.getUnflattenableInput()) .withoutResultFlattening());
/** * Disable <a href="https://cloud.google.com/bigquery/docs/reference/v2/jobs">flattening of * query results</a>. * * <p>Only valid when a query is used ({@link #fromQuery}). Setting this option when reading * from a table will cause an error during validation. */ public Read withoutResultFlattening() { return new Read(this.inner.withoutResultFlattening()); }