Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bigquery: Batch load example does not handle errors correctly #2551

Open
JurjenBiewenga opened this issue Mar 21, 2024 · 0 comments
Open

bigquery: Batch load example does not handle errors correctly #2551

JurjenBiewenga opened this issue Mar 21, 2024 · 0 comments
Assignees
Labels
api: bigquery Issues related to the BigQuery API. samples Issues that are directly related to samples. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@JurjenBiewenga
Copy link

Currently the Batch load example just logs the AppendResult, but ignores the Error/RowErrors fields. This makes the log look like it succeeded and there were no issues appending your rows. Proposing that the example should be checking the Error field, if there's content, then log all errors relating to the appended rows. E.g. something like:

if (responseItem.Error != null)
{
    await Console.Error.WriteLineAsync($"Appending rows resulted in an error: {responseItem.Error.Message}");
    foreach (RowError rowError in responseItem.RowErrors)
        await Console.Error.WriteLineAsync(rowError.ToString());
}
@product-auto-label product-auto-label bot added api: storage Issues related to the Cloud Storage API. samples Issues that are directly related to samples. labels Mar 21, 2024
@BrennaEpp BrennaEpp added api: bigquery Issues related to the BigQuery API. and removed api: storage Issues related to the Cloud Storage API. labels Aug 7, 2024
@BrennaEpp BrennaEpp changed the title Storage: Batch load example does not handle errors correctly bigquery: Batch load example does not handle errors correctly Aug 7, 2024
@amanda-tarafa amanda-tarafa self-assigned this Sep 4, 2024
@amanda-tarafa amanda-tarafa added the type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. label Sep 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigquery Issues related to the BigQuery API. samples Issues that are directly related to samples. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

No branches or pull requests

5 participants
@JurjenBiewenga @amanda-tarafa @BrennaEpp @cojenco and others