Class BigQueryInsertResults (2.4.0)

public sealed class BigQueryInsertResults

The results obtained after an insertion attempt. This will contain information on invalid rows if any.

Inheritance

Object > BigQueryInsertResults

Namespace

Google.Cloud.BigQuery.V2

Assembly

Google.Cloud.BigQuery.V2.dll

Constructors

BigQueryInsertResults(BigQueryClient, InsertOptions, IReadOnlyList<BigQueryInsertRow>, TableDataInsertAllResponse)

public BigQueryInsertResults(BigQueryClient client, InsertOptions options, IReadOnlyList<BigQueryInsertRow> originalRows, TableDataInsertAllResponse insertResponse)

Constructs a new set of insert results.

Parameters
NameDescription
clientBigQueryClient

The client used for the insert request. Must not be null.

optionsInsertOptions

The options used for the insert request. May be null.

originalRowsIReadOnlyList<BigQueryInsertRow>

The rows whose insert was attempted. Must not be null.

insertResponseTableDataInsertAllResponse

The response obtained after attempting the insert. Must not be null.

Properties

Errors

public IEnumerable<BigQueryInsertRowErrors> Errors { get; }

Returns a sequence over rows with insert errors. Each element represents a row with possibly multiple errors associated to it.

Property Value
TypeDescription
IEnumerable<BigQueryInsertRowErrors>

A sequence over rows with insert errors. Will never be null.

InsertAttemptRowCount

public int InsertAttemptRowCount { get; }

The amount of rows that were attempted in the insert operation.

Property Value
TypeDescription
Int32

OriginalRowsWithErrors

public int OriginalRowsWithErrors { get; }

The number of rows with reported errors in Errors. Note that it's possible that some errors are not associated to any particular row so this number might be smaller than the number of elements in Errors.

Property Value
TypeDescription
Int32

Status

public BigQueryInsertStatus Status { get; }

Status of the insert request. See BigQueryInsertStatus for a detailed explanation.

Property Value
TypeDescription
BigQueryInsertStatus

Methods

ThrowOnAnyError()

public BigQueryInsertResults ThrowOnAnyError()

Throws GoogleApiException if there were insert errors. The exception will contain details of these errors.

Returns
TypeDescription
BigQueryInsertResults
Exceptions
TypeDescription
GoogleApiException

There were insert errors.

ThrowOnNoneInserted()

public BigQueryInsertResults ThrowOnNoneInserted()

Throws GoogleApiException if no row was inserted.

Returns
TypeDescription
BigQueryInsertResults
Exceptions
TypeDescription
GoogleApiException

No row was inserted.

ThrowOnNotAllInserted()

public BigQueryInsertResults ThrowOnNotAllInserted()

Throws GoogleApiException if not all rows were inserted.

Returns
TypeDescription
BigQueryInsertResults
Exceptions
TypeDescription
GoogleApiException

Not all rows were inserted.