Class WriteResult

  • All Implemented Interfaces:
    org.apache.beam.sdk.values.POutput

    public final class WriteResult
    extends java.lang.Object
    implements org.apache.beam.sdk.values.POutput
    The result of a BigQueryIO.Write transform.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Map<org.apache.beam.sdk.values.TupleTag<?>,​org.apache.beam.sdk.values.PValue> expand()  
      void finishSpecifyingOutput​(java.lang.String transformName, org.apache.beam.sdk.values.PInput input, org.apache.beam.sdk.transforms.PTransform<?,​?> transform)  
      org.apache.beam.sdk.values.PCollection<com.google.api.services.bigquery.model.TableRow> getFailedInserts()
      Returns a PCollection containing the TableRows that didn't make it to BQ.
      org.apache.beam.sdk.values.PCollection<BigQueryInsertError> getFailedInsertsWithErr()
      Returns a PCollection containing the BigQueryInsertErrors with detailed error information.
      org.apache.beam.sdk.values.PCollection<BigQueryStorageApiInsertError> getFailedStorageApiInserts()
      Return any rows that persistently fail to insert when using a storage-api method.
      org.apache.beam.sdk.Pipeline getPipeline()  
      org.apache.beam.sdk.values.PCollection<com.google.api.services.bigquery.model.TableRow> getSuccessfulInserts()
      Returns a PCollection containing the TableRows that were written to BQ via the streaming insert API.
      org.apache.beam.sdk.values.PCollection<com.google.api.services.bigquery.model.TableRow> getSuccessfulStorageApiInserts()
      Return all rows successfully inserted using one of the storage-api insert methods.
      org.apache.beam.sdk.values.PCollection<TableDestination> getSuccessfulTableLoads()
      Returns a PCollection containing the TableDestinations that were successfully loaded using the batch load API.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • expand

        public java.util.Map<org.apache.beam.sdk.values.TupleTag<?>,​org.apache.beam.sdk.values.PValue> expand()
        Specified by:
        expand in interface org.apache.beam.sdk.values.POutput
      • getSuccessfulTableLoads

        public org.apache.beam.sdk.values.PCollection<TableDestination> getSuccessfulTableLoads()
        Returns a PCollection containing the TableDestinations that were successfully loaded using the batch load API.
      • getSuccessfulInserts

        public org.apache.beam.sdk.values.PCollection<com.google.api.services.bigquery.model.TableRow> getSuccessfulInserts()
        Returns a PCollection containing the TableRows that were written to BQ via the streaming insert API.
      • getFailedInserts

        public org.apache.beam.sdk.values.PCollection<com.google.api.services.bigquery.model.TableRow> getFailedInserts()
        Returns a PCollection containing the TableRows that didn't make it to BQ.

        Only use this method if you haven't enabled BigQueryIO.Write.withExtendedErrorInfo(). Otherwise use getFailedInsertsWithErr()

      • getFailedStorageApiInserts

        public org.apache.beam.sdk.values.PCollection<BigQueryStorageApiInsertError> 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

        public org.apache.beam.sdk.values.PCollection<com.google.api.services.bigquery.model.TableRow> 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

        public org.apache.beam.sdk.Pipeline getPipeline()
        Specified by:
        getPipeline in interface org.apache.beam.sdk.values.POutput
      • finishSpecifyingOutput

        public void finishSpecifyingOutput​(java.lang.String transformName,
                                           org.apache.beam.sdk.values.PInput input,
                                           org.apache.beam.sdk.transforms.PTransform<?,​?> transform)
        Specified by:
        finishSpecifyingOutput in interface org.apache.beam.sdk.values.POutput