Created
December 29, 2018 06:06
-
-
Save sandboxws/a380e190a6209542efc37078fb1cff19 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bqTableRows.apply("Write to BigQuery", | |
BigQueryIO.writeTableRows() | |
.to(options.getOutputTable()) // Passed as an argument from the command line | |
.withSchema(AlbumTableSchema.schema()) // The schema for the BigQuery table | |
.ignoreUnknownValues() // Ignore any values passed but not defined on the table schema | |
.withWriteDisposition(BigQueryIO.Write.WriteDisposition.WRITE_APPEND) // Append to the BigQuery table. | |
.withCreateDisposition(BigQueryIO.Write.CreateDisposition.CREATE_IF_NEEDED) // Create the BigQuery table if it doesn't exist | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment