Skip to content

Instantly share code, notes, and snippets.

@sandboxws
Created January 19, 2019 19:06
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 sandboxws/0837791f0d3eb3bab1abcc32911ea392 to your computer and use it in GitHub Desktop.
Save sandboxws/0837791f0d3eb3bab1abcc32911ea392 to your computer and use it in GitHub Desktop.
// Extract errors PCollectionTuple
PCollection<String> bqTableRowsErrors =
bqTableRowsTuple.get(bqTableRowsFailedTag)
.setCoder(NullableCoder.of(StringUtf8Coder.of()));
// Log errors to a text file under cloud storage.
bqTableRowsErrors
.apply(
"Write Errors",
TextIO.write().to("gs://beam-tutorial/album_errors.txt")
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment