Я использую операцию «Копировать данные» для копирования данных из службы REST на Azure SQL Server.Служба REST возвращает иерархический ответ JSON, и я использую отображение схемы, чтобы вставить его в таблицу SQL.Это работает, как и ожидалось, за исключением нескольких атрибутов, в имени которых есть пробелы.Вот пример сопоставления схемы с последним атрибутом, определившим данный вопрос:
"translator": {
"type": "TabularTranslator",
"schemaMapping": {
"id": "id",
"type": "type",
"lead_verb": "lead_verb",
"lead_action_performed": "lead_action_performed",
"created_at": "created_at",
"lead_id": "lead_id",
"selected_action": "selected_action",
"rate_type": "rate_type",
"channel_rate_id": "channel_rate_id",
"tenant_id": "tenant_id",
"unit_id": "unit_id",
"created_by_id": "created_by_id",
"source_id": "source_id",
"lead_changes_humanized.Quoted Rate[1]": "lead_changes_humanized"
},
"collectionReference": "$.lead_events"
}
Это приводит к следующей ошибке:
{
"errorCode": "2200",
"message": "ErrorCode=UserErrorInvalidJsonArrayPathDefinition,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=Error occurred when deserializing source JSON data. Please check whether the JsonPath in JsonNodeReference and JsonPathDefintion is valid.,Source=Microsoft.DataTransfer.Common,''Type=Newtonsoft.Json.JsonException,Message=Unexpected character while parsing path: ,Source=Newtonsoft.Json,'",
"failureType": "UserError",
"target": "cpyCompaniesLeadEvents"
}
Я попытался процитировать путь следующим образом:
"lead_changes_humanized.\"Quoted Rate\"[1]": "lead_changes_humanized"
И с одинарными кавычками:
"lead_changes_humanized.'Quoted Rate'[1]": "lead_changes_humanized"
Все это приводит к одной и той же ошибке.Я проверил путь JSON с помощью средства проверки пути.
Вопрос: как мне справиться с этим пробелом?