首页 > 解决方案 > Azure 数据资源管理器摄取,DeleteSourceOnSuccess 不起作用

问题描述

我正在将一个 zip 文件从 blob 存储提取到 ADX 并设置选项 DeleteSourceOnSuccess = true。摄取工作正常,但不幸的是,操作后源文件没有被删除。我该如何调试呢?

var kustoIngestionProperties = new KustoIngestionProperties(databaseName: adxDatabase, tableName: table);
kustoIngestionProperties.AdditionalProperties = new Dictionary<string, string>()
{
      {"zipPattern", "stats*.txt"},
      {"format", "json"},
      {"ingestionMappingReference", "WiFiJsonMapping"}
};
var sourceOptions = new StorageSourceOptions() { DeleteSourceOnSuccess = true };

IRetryPolicy retryPolicy = new NoRetry();
((IKustoQueuedIngestClient)client).QueueRetryPolicy = retryPolicy;
try
{     
     var sourceBlobSAS = CreateBlobUriWithSas(source_blob);
     await client.IngestFromStorageAsync(uri: sourceBlobSAS, ingestionProperties: kustoIngestionProperties, sourceOptions);
     log.LogInformation($"File: {source_blob.Name} ingested to {tenant}_{site}_raw_logs");
}
catch (System.Exception ex)
{
    log.LogError(ex.ToString());
    throw;
}
finally
{
    client.Dispose();
}

标签: azure-data-explorer

解决方案


推荐阅读