Google BigQuery v2 API - Class BigQueryInsertResults (3.10.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
Name Description
client BigQueryClient

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

options InsertOptions

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

originalRows IReadOnlyListBigQueryInsertRow

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

insertResponse TableDataInsertAllResponse

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
Type Description
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
Type Description
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
Type Description
int

Status

public BigQueryInsertStatus Status { get; }

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

Property Value
Type Description
BigQueryInsertStatus

Methods

ThrowOnAnyError()

public BigQueryInsertResults ThrowOnAnyError()

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

Returns
Type Description
BigQueryInsertResults
Exceptions
Type Description
GoogleApiException

There were insert errors.

ThrowOnNoneInserted()

public BigQueryInsertResults ThrowOnNoneInserted()

Throws GoogleApiException if no row was inserted.

Returns
Type Description
BigQueryInsertResults
Exceptions
Type Description
GoogleApiException

No row was inserted.

ThrowOnNotAllInserted()

public BigQueryInsertResults ThrowOnNotAllInserted()

Throws GoogleApiException if not all rows were inserted.

Returns
Type Description
BigQueryInsertResults
Exceptions
Type Description
GoogleApiException

Not all rows were inserted.