public sealed class BigQueryInsertResults
The results obtained after an insertion attempt. This will contain information on invalid rows if any.
Namespace
Google.Cloud.BigQuery.V2Assembly
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 | IReadOnlyList<BigQueryInsertRow> The rows whose insert was attempted. Must not be null. |
insertResponse | Google.Apis.Bigquery.v2.Data.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 |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
Int32 |
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 excetpion 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. |