【发布时间】:2019-08-23 22:54:34
【问题描述】:
我有一个 APIM 策略,它记录到这样的事件中心:-
<log-to-eventhub logger-id="eventhublogger" partition-id="0">
@{
var body = context.Request.Body?.As<string>(true);
if (body != null && body.Length > 1024)
{
body = body.Substring(0, 1024);
}
var json = new JObject(
new JProperty("DateTime", DateTime.Now),
new JProperty("Method", context.Request.Method),
new JProperty("Path", context.Request.Url.Path + context.Request.Url.QueryString),
new JProperty("RequestBody", body)
);
return json.ToString();
}
</log-to-eventhub>
我想尝试将此数据从事件中心提取到 DataExplorer
我不确定应该如何创建表格映射
我设置了一些 blob 存储并将事件中心数据转发给它,以便我可以看到它的样子。在 blob 中,它看起来像这样:-
Objavro.codecnullavro.schema.{"type":"record","name":"EventData","namespace":"Microsoft.ServiceBus.Messaging","fields":[{"name":"SequenceNumber ","type":"long"},{"name":"Offset","type":"string"},{"name":"EnqueuedTimeUtc","type":"string"},{"name ":"SystemProperties","type":{"type":"map","values":["long","double","string","bytes"]}},{"name":"属性","type":{"type":"map","values":["long","double","string","bytes","null"]}},{"name":"Body ","type":["null","bytes"]}]}
�106408(2019 年 8 月 23 日上午 4:41:18
{ "日期时间": "2019-08-23T04:40:53.9151977+00:00", “方法”:“POST”, "路径": "/api/FuncCreateLead", "RequestBody": "{\r\n \"Title\": \"Miss\",\r\n \"FirstName\": \"Alice\"} }
是否需要创建包含以下字段的表映射?
SequenceNumber、Offset、EnqueuedTimeUtc、SystemProperties、Properties、Body?
【问题讨论】:
标签: azure-api-management azure-data-explorer