I am using Google BigQuery API with Service Account Authorization in C# console application.
When i am trying to load CSV job, it throws " Value cannot be null. Parameter name: baseUri " Exception. It specific on only single table, when i am changing the table name it all gets work.
Here is the stack trace:
at Microsoft.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at Microsoft.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccess(Task task)
at Microsoft.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
at Microsoft.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
at Google.Apis.Upload.ResumableUpload`1.<UploadCoreAsync>d__e.MoveNext() in c:\code\google.com\google-api-dotnet-client\default\Tools\Google.Apis.Release\bin\Debug\test\default\Src\GoogleApis\Apis\[Media]\Upload\ResumableUpload.cs:line 459
Job Upload Code:
JobsResource.InsertMediaUpload InsertMediaUpload = new obsResource.InsertMediaUpload(BigQueryService, Job, Job.JobReference.ProjectId, fileStream, "application/octet-stream");
var JobInfo = InsertMediaUpload.UploadAsync();
Thanks.
I manage to found the root cause and solution for my problem.
Actual Error: Table Schema getting Mismatched.
Reason: In Big Query table Field Mode is REQUIRED. I am getting table schema from Response of this query " Select * From Table-name Limit 1 " because not able to build new schema. When i am getting table schema from query response the field mode changed into NULLABLE. That's why i am getting Schema Mismatch.
Questions to Google Developers:
Developer Suggestion:
Use Fiddler tool to get actual error. In my case i am getting actual error from Textview under Inspectors Tab. Hope this post will helps too.
Thanks.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.