Microsoft Migration Database Tool Improper character 错误
Microsoft Migration Database Tool Improper character error
我正在尝试使用 https://azure.microsoft.com/en-us/documentation/articles/documentdb-import-data/#Prerequisites 将 json 文件上传到 Azure DocumentDB。上传开始后,我收到此错误:
System.ArgumentException: The resource name presented contains invalid character '/'.
at Microsoft.Azure.Documents.Client.DocumentClient.ValidateResource(Resource resource)
at Microsoft.Azure.Documents.Client.DocumentClient.d__33.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
我似乎找不到这方面的文档,或者我不知道去哪里找。我想要一些关于这意味着什么以及如何解决它的指导。我的猜测是“/”是我文档中某处的无效字符,可能在第 33 行。
这是第 33 行之前的文档,如果它是这样的话。
[
{
"name":"Cabinet De Lespinasse",
"accountid":2953,
"address":null,
"city":null,
"country":null,
"createdAt":null,
"heading":null,
"headingid":null,
"latitude":null,
"longitude":null,
"objectId":null,
"phonenumber1":null,
"website":null,
"display":null,
"email":null,
"aboutUs":"Education: Graduated from the Faculty of Law, State University of Haiti, 1983, Types of Practice: Established in 1877, the law office is specialized in intellectual property law for trademark and patent, insurance and commercial matters. Does not handle collection, Languages: Creole, French, English",
"Verified":false,
"Brands":null,
"Products":null,
"Services":null,
"Facebook":null,
"Instagram":null,
"googlePlus":null,
"Twitter":null,
"LinkedIn":null,
"Youtube":null,
"Pinterest":null,
"paymentMethods":null,
"languagesSpoken":null
},
{//<--This is line 33//
"name":"Cabinet Villejoint",
"accountid":2952,
"address":null,
更新:
当我按以下格式上传一个对象时,上传成功。我根据下面@larry 的评论删除了日期字段。
{
"name": "Western Union Agence Belmart ",
"accountid": 2851,
"address": "Route de Tabarre,",
"city": "Port-au-Prince",
"country": "Haiti",
"heading": "Money Transfer Locations",
"headingid": 428,
"latitude": null,
"longitude": null,
"objectId": "0NM7Bav1Lp",
"phonenumber1": "+509 3859 6346",
"website": "http://868.ht",
"display": "Western Union Agence Belmart",
"email": null,
"aboutUs": null,
"Verified": false,
"Brands": null,
"Products": null,
"Services": null,
"Facebook": null,
"Instagram": null,
"googlePlus": null,
"Twitter": null,
"LinkedIn": null,
"Youtube": null,
"Pinterest": null,
"paymentMethods": null,
"languagesSpoken": null
}
但是,当我有第二个对象时,上传失败。知道这里发生了什么吗?
[{
"name":"Western Union Agence Belmart ",
"accountid":2851,
"address":"Route de Tabarre,",
"city":"Port-au-Prince",
"country":"Haiti",
"heading":"Money Transfer Locations",
"headingid":428,
"latitude":null,
"longitude":null,
"objectId":"0NM7Bav1Lp",
"phonenumber1":"+509 3859 6346",
"website":"http://868.ht",
"display":"Western Union Agence Belmart",
"email":null,
"aboutUs":null,
"Verified":false,
"Brands":null,
"Products":null,
"Services":null,
"Facebook":null,
"Instagram":null,
"googlePlus":null,
"Twitter":null,
"LinkedIn":null,
"Youtube":null,
"Pinterest":null,
"paymentMethods":null,
"languagesSpoken":null
},
{
"name":"Western Union Agence Belmart ",
"accountid":2853,
"address":"Route de Tabarre,",
"city":"Port-au-Prince",
"country":"Haiti",
"heading":"Money Transfer Locations",
"headingid":428,
"latitude":null,
"longitude":null,
"objectId":"0NM7Bav1Lp",
"phonenumber1":"+509 3859 6346",
"website":"http://868.ht",
"display":"Western Union Agence Belmart",
"email":null,
"aboutUs":null,
"Verified":false,
"Brands":null,
"Products":null,
"Services":null,
"Facebook":null,
"Instagram":null,
"googlePlus":null,
"Twitter":null,
"LinkedIn":null,
"Youtube":null,
"Pinterest":null,
"paymentMethods":null,
"languagesSpoken":null
}]
谢谢。
显然,正确的答案是由下面的@larry maccherone 在 Azure 门户中的 DocumentDb 文档资源管理器中提供的,您一次只能上传一个 json 对象。我在文档中遗漏了这一点,或者它没有在那里说明。然而,这就是我经历的结果。谢谢,拉里。
我正在尝试使用 https://azure.microsoft.com/en-us/documentation/articles/documentdb-import-data/#Prerequisites 将 json 文件上传到 Azure DocumentDB。上传开始后,我收到此错误:
System.ArgumentException: The resource name presented contains invalid character '/'. at Microsoft.Azure.Documents.Client.DocumentClient.ValidateResource(Resource resource) at Microsoft.Azure.Documents.Client.DocumentClient.d__33.MoveNext() --- End of stack trace from previous location where exception was thrown ---
我似乎找不到这方面的文档,或者我不知道去哪里找。我想要一些关于这意味着什么以及如何解决它的指导。我的猜测是“/”是我文档中某处的无效字符,可能在第 33 行。
这是第 33 行之前的文档,如果它是这样的话。
[
{
"name":"Cabinet De Lespinasse",
"accountid":2953,
"address":null,
"city":null,
"country":null,
"createdAt":null,
"heading":null,
"headingid":null,
"latitude":null,
"longitude":null,
"objectId":null,
"phonenumber1":null,
"website":null,
"display":null,
"email":null,
"aboutUs":"Education: Graduated from the Faculty of Law, State University of Haiti, 1983, Types of Practice: Established in 1877, the law office is specialized in intellectual property law for trademark and patent, insurance and commercial matters. Does not handle collection, Languages: Creole, French, English",
"Verified":false,
"Brands":null,
"Products":null,
"Services":null,
"Facebook":null,
"Instagram":null,
"googlePlus":null,
"Twitter":null,
"LinkedIn":null,
"Youtube":null,
"Pinterest":null,
"paymentMethods":null,
"languagesSpoken":null
},
{//<--This is line 33//
"name":"Cabinet Villejoint",
"accountid":2952,
"address":null,
更新:
当我按以下格式上传一个对象时,上传成功。我根据下面@larry 的评论删除了日期字段。
{
"name": "Western Union Agence Belmart ",
"accountid": 2851,
"address": "Route de Tabarre,",
"city": "Port-au-Prince",
"country": "Haiti",
"heading": "Money Transfer Locations",
"headingid": 428,
"latitude": null,
"longitude": null,
"objectId": "0NM7Bav1Lp",
"phonenumber1": "+509 3859 6346",
"website": "http://868.ht",
"display": "Western Union Agence Belmart",
"email": null,
"aboutUs": null,
"Verified": false,
"Brands": null,
"Products": null,
"Services": null,
"Facebook": null,
"Instagram": null,
"googlePlus": null,
"Twitter": null,
"LinkedIn": null,
"Youtube": null,
"Pinterest": null,
"paymentMethods": null,
"languagesSpoken": null
}
但是,当我有第二个对象时,上传失败。知道这里发生了什么吗?
[{
"name":"Western Union Agence Belmart ",
"accountid":2851,
"address":"Route de Tabarre,",
"city":"Port-au-Prince",
"country":"Haiti",
"heading":"Money Transfer Locations",
"headingid":428,
"latitude":null,
"longitude":null,
"objectId":"0NM7Bav1Lp",
"phonenumber1":"+509 3859 6346",
"website":"http://868.ht",
"display":"Western Union Agence Belmart",
"email":null,
"aboutUs":null,
"Verified":false,
"Brands":null,
"Products":null,
"Services":null,
"Facebook":null,
"Instagram":null,
"googlePlus":null,
"Twitter":null,
"LinkedIn":null,
"Youtube":null,
"Pinterest":null,
"paymentMethods":null,
"languagesSpoken":null
},
{
"name":"Western Union Agence Belmart ",
"accountid":2853,
"address":"Route de Tabarre,",
"city":"Port-au-Prince",
"country":"Haiti",
"heading":"Money Transfer Locations",
"headingid":428,
"latitude":null,
"longitude":null,
"objectId":"0NM7Bav1Lp",
"phonenumber1":"+509 3859 6346",
"website":"http://868.ht",
"display":"Western Union Agence Belmart",
"email":null,
"aboutUs":null,
"Verified":false,
"Brands":null,
"Products":null,
"Services":null,
"Facebook":null,
"Instagram":null,
"googlePlus":null,
"Twitter":null,
"LinkedIn":null,
"Youtube":null,
"Pinterest":null,
"paymentMethods":null,
"languagesSpoken":null
}]
谢谢。
显然,正确的答案是由下面的@larry maccherone 在 Azure 门户中的 DocumentDb 文档资源管理器中提供的,您一次只能上传一个 json 对象。我在文档中遗漏了这一点,或者它没有在那里说明。然而,这就是我经历的结果。谢谢,拉里。