Skip to content

Instantly share code, notes, and snippets.

@juri96
Created November 15, 2019 13:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save juri96/38b94099f9f3f8bfaec4772021d06930 to your computer and use it in GitHub Desktop.
Save juri96/38b94099f9f3f8bfaec4772021d06930 to your computer and use it in GitHub Desktop.
fun writeToBigQuery(resultTableSpec: TableReference): BigQueryIO.Write<TableRow> {
return BigQueryIO.writeTableRows()
.to(resultTableSpec)
.withSchema(RecordSchema.schema)
.withCreateDisposition(
BigQueryIO.Write.CreateDisposition.CREATE_IF_NEEDED
)
.withWriteDisposition(
BigQueryIO.Write.WriteDisposition.WRITE_APPEND
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment