[英]Value cannot be null. Parameter name: baseUri
I am using Google BigQuery API with Service Account Authorization in C# console application. 我在C#控制台应用程序中使用带有服务帐户授权的Google BigQuery API。
When i am trying to load CSV job, it throws " Value cannot be null. Parameter name: baseUri " Exception. 当我尝试加载CSV作业时,它抛出“ 值不能为null。参数名称:baseUri ”异常。 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.
我从该查询的响应“ Select * From Table-name Limit 1 ”中获取表架构,因为无法构建新架构。 When i am getting table schema from query response the field mode changed into NULLABLE.
当我从查询响应中获取表架构时,字段模式更改为NULLABLE。 That's why i am getting Schema Mismatch.
这就是为什么我遇到架构不匹配的原因。
Questions to Google Developers: 给Google开发人员的问题:
Developer Suggestion: 开发者建议:
Use Fiddler tool to get actual error. 使用Fiddler工具获取实际错误。 In my case i am getting actual error from Textview under Inspectors Tab.
就我而言,我从“ 检查员”选项卡下的Textview中获取实际错误。 Hope this post will helps too.
希望这篇文章也会有所帮助。
Thanks. 谢谢。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.