Collectives™ on Stack Overflow
Find centralized, trusted content and collaborate around the technologies you use most.
Learn more about Collectives
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Learn more about Teams
Ask Question
How to use
BigQueryIO.read
using
SerializableFunction()
instead of
BigQueryIO.readTableRows()
? As I've heard that
readTableRows
is time consuming.
Our objective is to build dataflow to execute bigquery select query and write results to bigquery and GCS.To achieve that, I have used
BigQueryIO.readTableRows()
to read data, but I've heard it is slow so what to use
BigQueryIO.read
using
SerializableFunction()
to retrieve complete row. Could you please help me?
// to read data from bigquery
p.apply(
BigQueryIO.readTableRows()
.fromQuery("myquery")
.usingStandardSql()
.withoutValidation()
.withQueryLocation("EU")
// to write result set to bigquery
.apply(
BigQueryIO.writeTableRows()
.to(tableSpec)
.withJsonSchema(tableSchemaJson)
.withCreateDisposition(BigQueryIO.Write.CreateDisposition.CREATE_IF_NEEDED)
.withWriteDisposition(BigQueryIO.Write.WriteDisposition.WRITE_APPEND)
How to achieve same thing using BigQueryIO.read
using SerializableFunction()
?
–
–
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.