2
votes

I'm trying to insert data into BigQuery using the BigQuery Api C# Sdk.

I created a new Job with Json Newline Delimited data. When I use :

  • 100 lines for inputs : OK

  • 250 lines for inputs : OK

  • 500 lines for inputs : KO

  • 2500 lines : KO

    The error encountered is :

    "status": { "state": "DONE", "errorResult": { "reason": "invalid", "message": "Too many errors encountered. Limit is: 0." }, "errors": [ { "reason": "internalError", "location": "File: 0", "message": "Unexpected. Please try again." }, { "reason": "invalid", "message": "Too many errors encountered. Limit is: 0." } ] }

The file works well when I use the Bq Tools with command :

  • bq load --source_format=NEWLINE_DELIMITED_JSON dataset.datatable pathToJsonFile

Something seems to be wrong on server side or maybe when I transmit the file but we cannot get more log than "internal server error"

Does anyone have more informations on this ?

Thanks you

1
For information, here is a jobid which failed : job_ZkUSUDZrt0WNiVWWJYJ89Yw81x0Jeremie Devillard

1 Answers

0
votes

"Unexpected. Please try again." could either indicate that the contents of the files you provided had unexpected characters, or it could mean that an unexpected internal server condition occurred. There are several questions which might help shed some light on this:

  • does this consistently happen no matter how many times you retry?

  • does this directly depend on the lines in the file, or can you construct a simple upload file which doesn't trigger the error condition?

One option to potentially avoid these problems is to send the load job request with configuration.load.maxBadRecords higher than zero.

Feel free to comment with more info and I can maybe update this answer.