Skip to content

Instantly share code, notes, and snippets.

@akj009
Created January 11, 2020 10:14
Show Gist options
  • Save akj009/6afd56c273744f6f1f82af2da10d259e to your computer and use it in GitHub Desktop.
Save akj009/6afd56c273744f6f1f82af2da10d259e to your computer and use it in GitHub Desktop.
creating generic record pcollection using bigquery io
final PCollection<GenericRecord> genericRecordPCollection = pipeline.apply(
BigQueryIO
.read(SchemaAndRecord::getRecord)
.fromQuery(query)
.withCoder(AvroCoder.of(schema)).usingStandardSql()
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment