Google BigQuery v2 API - Class BigQueryInsertResults (3.6.0)

public sealed class BigQueryInsertResults

Reference documentation and code samples for the Google BigQuery v2 API 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.

originalRowsIReadOnlyListBigQueryInsertRow

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
IEnumerableBigQueryInsertRowErrors

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
int

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
int

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.