Class WriteResult
java.lang.Object
org.apache.beam.sdk.io.gcp.bigquery.WriteResult
- All Implemented Interfaces:
POutput
The result of a
BigQueryIO.Write
transform.-
Method Summary
Modifier and TypeMethodDescriptionexpand()
void
finishSpecifyingOutput
(String transformName, PInput input, PTransform<?, ?> transform) As part of applying the producingPTransform
, finalizes this output to make it ready for being used as an input and for running.Returns aPCollection
containing theTableRow
s that didn't make it to BQ.Returns aPCollection
containing theBigQueryInsertError
s with detailed error information.Return any rows that persistently fail to insert when using a storage-api method.Returns aPCollection
containing theTableRow
s that were written to BQ via the streaming insert API.Return all rows successfully inserted using one of the storage-api insert methods.Returns aPCollection
containing theTableDestination
s that were successfully loaded using the batch load API.
-
Method Details
-
expand
Description copied from interface:POutput
Expands thisPOutput
into a list of its component outputPValues
.- A
PValue
expands to itself. - A tuple or list of
PValues
(such asPCollectionTuple
orPCollectionList
) expands to its componentPValue PValues
.
Not intended to be invoked directly by user code.
- A
-
getSuccessfulTableLoads
Returns aPCollection
containing theTableDestination
s that were successfully loaded using the batch load API. -
getSuccessfulInserts
Returns aPCollection
containing theTableRow
s that were written to BQ via the streaming insert API. -
getFailedInserts
Returns aPCollection
containing theTableRow
s that didn't make it to BQ.Only use this method if you haven't enabled
BigQueryIO.Write.withExtendedErrorInfo()
. Otherwise usegetFailedInsertsWithErr()
-
getFailedInsertsWithErr
Returns aPCollection
containing theBigQueryInsertError
s with detailed error information.Only use this method if you have enabled
BigQueryIO.Write.withExtendedErrorInfo()
. Otherwise usegetFailedInserts()
-
getFailedStorageApiInserts
Return any rows that persistently fail to insert when using a storage-api method. For example: rows with values that do not match the BigQuery schema or rows that are too large to insert. This collection is in the global window. -
getSuccessfulStorageApiInserts
Return all rows successfully inserted using one of the storage-api insert methods. Rows undergo a conversion process, so while these TableRow objects are logically the same as the rows in the initial PCollection, they may not be physically identical. This PCollection is in the global window. -
getPipeline
Description copied from interface:POutput
- Specified by:
getPipeline
in interfacePOutput
-
finishSpecifyingOutput
Description copied from interface:POutput
As part of applying the producingPTransform
, finalizes this output to make it ready for being used as an input and for running.This includes ensuring that all
PCollections
haveCoders
specified or defaulted.Automatically invoked whenever this
POutput
is output, afterPOutput.finishSpecifyingOutput(String, PInput, PTransform)
has been called on each componentPValue
returned byPOutput.expand()
.- Specified by:
finishSpecifyingOutput
in interfacePOutput
-