Йони, не могли бы вы объяснить, что вы имеете в виду под bag_unpack
несогласованным несоответствием? Я выровнял свой bag_unpack ... project-reorder
, чтобы он соответствовал целевой таблице, в которую я распаковываю, но он просто меняет несколько типов переменных в сообщении об ошибке:
Query schema does not match table schema.
QuerySchema=(
'datetime,long,datetime,string,string,datetime,string,
long,real,string,bool,guid,guid,string,real'),
TableSchema=(
'datetime,long,datetime,string,string,datetime,string,
long,real,guid,guid,string,bool,string,real')
действительно запутался, что такое схема таблицы и схема запроса на этом этапе.
Для справки мой запрос выглядит так:
.set-or-append async apiV2FormationSearchTransform <|
//set notruncation;
apiV2FormationSearchLatest
| where hash(toguid(fullRecord["id"]), 1) == 0
| project fullRecord
| evaluate bag_unpack(fullRecord)
| extend dateCatalogued = todatetime(column_ifexists("dateCatalogued", ""))
, simpleId = tolong(column_ifexists("simpleId", ""))
, dateLastModified = todatetime(column_ifexists("dateLastModified", ""))
, reportedFormationName = tostring(column_ifexists("reportedFormationName", ""))
, comments = tostring(column_ifexists("comments", ""))
, dateCreated = todatetime(column_ifexists("dateCreated", ""))
, formationName = tostring(column_ifexists("formationName", ""))
, internalId = tolong(column_ifexists("internalId", ""))
, topDepth = toreal(column_ifexists("topDepth", ""))
, wellId = column_ifexists("wellId", toguid(""))
, id = column_ifexists("id", toguid(""))
, methodObtained = tostring(column_ifexists("methodObtained", ""))
, isTarget = tobool(column_ifexists("isTarget", ""))
, completionId = tostring(column_ifexists("completionId", ""))
, baseDepth = toreal(column_ifexists("baseDepth", ""))
| project-reorder dateCatalogued
, simpleId
, dateLastModified
, reportedFormationName
, comments
, dateCreated
, formationName
, internalId
, topDepth
, wellId
, id
, methodObtained
, isTarget
, completionId
, baseDepth
и это результат getschema
моей целевой таблицы:
dateCatalogued 0 System.DateTime datetime
simpleId 1 System.Int64 long
dateLastModified 2 System.DateTime datetime
reportedFormationName 3 System.String string
comments 4 System.String string
dateCreated 5 System.DateTime datetime
formationName 6 System.String string
internalId 7 System.Int64 long
topDepth 8 System.Double real
wellId 9 System.Guid guid
id 10 System.Guid guid
methodObtained 11 System.String string
isTarget 12 System.SByte bool
completionId 13 System.String string
baseDepth 14 System.Double real
person
steven hurwitt
schedule
11.08.2020
getschema
для проверки фактического совпадения схемы запроса и схемы целевой таблицы. Обратите внимание, что если несоответствие несовместимо, оно может предложить вам использовать оператор запроса или плагин, схема вывода которого зависит от входных данных и может варьироваться в зависимости от выполнения (например,pivot
илиbag_unpack
) - person Yoni   schedule 08.08.2020| summarize count()
? если да, укажите идентификатор запроса клиента для вашей неудавшейся попытки - person Yoni   schedule 08.08.2020.show commands
Text, чтобы просмотреть свой запрос, и не увидел никаких сводок. Идентификатор активности клиентаKNC.execute;adabeccc-2435-4680-a8be-8f3ac6b1011c
. На данный момент я решил эту проблему, но это похоже на законную ошибку. Мой запрос был очень большим (он построен программно и включает в себя большой список в операторе IN), поэтому, возможно, столбец Text усек запрос, и поэтому я не вижу сводку? - person Jeremy Fisher   schedule 09.08.2020