首页 > 解决方案 > Kusto 流式摄取:ErrorReason=Not Found

问题描述

我正在尝试从我的 c# 应用程序中使用client.IngestFromStreamAsyncclient.IngestFromStream摄取数据,但总是收到以下错误:

MonitoredActivityContext=(ActivityType=KustoManagedStreamingIngestClient.IngestFromStream, Timestamp=2021-02-08T17:57:52.0547851Z, ParentActivityId=570e5455-1c3d-4cb4-82ff-a06761e66a30, TimeSinceStarted=1921,1077 [ms])IngestionSourceIda-4b14422981ab2a-4b1442 -9d06-1951c7aa972f IngestionSource=流错误=未找到(404-未找到):。这通常代表一个永久性错误,重试不太可能有帮助。错误详情:DataSource='https://table.southcentralus.kusto.windows.net/v1/rest/ingest/bla/table?streamFormat=json&mappingName=JsonMapping', DatabaseName=, ClientRequestId='KI.KustoManagedStreamingIngestClient.IngestFromStream.ad8c8892 -7495-483D-90BC-8585483445FA; 73864817-246C-479C-A2DA-138ACA01B9A2; F182AB29-8129-812A-4B4B4B4B4B4B4B44-9D06-9D06-1951C7AA-00STIME000000-0000000000000000000000-0000000000来 - 08T17:57:53。

这就是我定义摄取映射的方式

var kustoIngestionProperties = new KustoIngestionProperties(databaseName: databaseName, tableName: rtable)
{         
   Format = DataSourceFormat.json,                
   IngestionMapping = new IngestionMapping()
   {
      IngestionMappingReference = "JsonMapping",
      IngestionMappingKind = Kusto.Data.Ingestion.IngestionMappingKind.Json                   
   }                    
};

在引用映射之前,我这样创建它:

.create table ingest_table ingestion json mapping 'JsonMapping' '[{"column":"Timestamp","Properties":{"path":"$.Timestamp"}},{"column":"AskRatioVar","Properties":{"path":"$.AskRatioVar"}},{"column":"score_BidRatioVar","Properties":{"path":"$.score_BidkRatioVar"}},]'

任何想法可能导致错误?所有流式传输示例似乎都在这里过时:https ://github.com/Azure/azure-kusto-samples-dotnet/tree/master/client/StreamingIngestionSample

谢谢

标签: azure-data-explorer

解决方案


您应该验证您传递的数据库、表和摄取映射的名称是否确实存在于您的集群中。

具体来说 - 在您引用的活动中,您引用了一个名为 的摄取映射JsonAnomalyMapping1,而该表只有一个名为JsonAnomalyMapping


推荐阅读