如何在 Azure 数据资源管理器 (Kusto) 中撤消引入?
How do I undo an ingestion in Azure Data Explorer (Kusto)?
上下文:我正在遵循本指南:https://docs.microsoft.com/en-us/azure/kusto/api/netfx/kusto-ingest-client-examples
我正在使用 IngestFromStorageAsync
- 我看到结果有一个 IngestionSourceId
(GUID) - 但我不知道如何处理它。 (这不是范围 ID)
我假设您可以使用此 ID 删除所有导入的记录...
有谁知道如何撤消摄取?
目前,我正在使用 .show cluster extents
来显示范围 ID,然后调用 .drop extent [id]
。这是撤消摄取的正确方法吗?
“撤消”摄取实质上是删除摄取的数据。
删除数据可以在范围(数据分片)的分辨率下完成,并且范围可以在任何给定时刻相互合并(例如,在数据被摄取后立即)。
如果你知道你有可能想要删除你刚刚摄取的数据(并且你无法修复导致那些“错误”(?)摄取的摄取管道),一个方向你可以遵循的是使用范围标签,以便能够识别作为摄取的一部分创建的范围,然后删除它们。
可在此处找到更多信息:https://docs.microsoft.com/en-us/azure/kusto/management/extents-overview。
如果您确实选择为此目的使用标签(并且无法避免需要“撤消”您的摄取的情况),请确保您阅读该文档中的“性能说明”。
文档摘录link:
'ingest-by:' 范围标签
以 ingest-by:
前缀开头的标签可用于确保数据
只被摄入一次。如果已经存在具有此特定 ingest-by:
标记的范围,您可以发出 ingestIfNotExists
属性 命令以防止数据被摄取。
tags
和 ingestIfNotExists
的值都是字符串数组,
序列化为 JSON.
以下示例仅提取一次数据。第二和第三条命令什么都不做:
.ingest ... with (tags = '["ingest-by:2016-02-17"]')
.ingest ... with (ingestIfNotExists = '["2016-02-17"]')
.ingest ... with (ingestIfNotExists = '["2016-02-17"]', tags = '["ingest-by:2016-02-17"]')
[!NOTE]
Generally, an ingest command is likely to include
both an ingest-by:
tag and an ingestIfNotExists
property,
set to the same value, as shown in the 3rd command above.
[!WARNING]
- Overusing
ingest-by
tags isn't recommended.
- If the pipeline feeding Kusto is known to have data duplications, we recommend that you solve these duplications as much as possible, before ingesting the data into Kusto.
- Attempting to set a unique
ingest-by
tag for each ingestion call might result with severe impact on performance.
- If such tags aren't required for some period of time after the data is ingested, we recommend that you drop extent tags.
- To drop the tags automatically, you can set an extent tags retention policy.
上下文:我正在遵循本指南:https://docs.microsoft.com/en-us/azure/kusto/api/netfx/kusto-ingest-client-examples
我正在使用 IngestFromStorageAsync
- 我看到结果有一个 IngestionSourceId
(GUID) - 但我不知道如何处理它。 (这不是范围 ID)
我假设您可以使用此 ID 删除所有导入的记录...
有谁知道如何撤消摄取?
目前,我正在使用 .show cluster extents
来显示范围 ID,然后调用 .drop extent [id]
。这是撤消摄取的正确方法吗?
“撤消”摄取实质上是删除摄取的数据。
删除数据可以在范围(数据分片)的分辨率下完成,并且范围可以在任何给定时刻相互合并(例如,在数据被摄取后立即)。
如果你知道你有可能想要删除你刚刚摄取的数据(并且你无法修复导致那些“错误”(?)摄取的摄取管道),一个方向你可以遵循的是使用范围标签,以便能够识别作为摄取的一部分创建的范围,然后删除它们。
可在此处找到更多信息:https://docs.microsoft.com/en-us/azure/kusto/management/extents-overview。 如果您确实选择为此目的使用标签(并且无法避免需要“撤消”您的摄取的情况),请确保您阅读该文档中的“性能说明”。
文档摘录link:
'ingest-by:' 范围标签
以 ingest-by:
前缀开头的标签可用于确保数据
只被摄入一次。如果已经存在具有此特定 ingest-by:
标记的范围,您可以发出 ingestIfNotExists
属性 命令以防止数据被摄取。
tags
和 ingestIfNotExists
的值都是字符串数组,
序列化为 JSON.
以下示例仅提取一次数据。第二和第三条命令什么都不做:
.ingest ... with (tags = '["ingest-by:2016-02-17"]')
.ingest ... with (ingestIfNotExists = '["2016-02-17"]')
.ingest ... with (ingestIfNotExists = '["2016-02-17"]', tags = '["ingest-by:2016-02-17"]')
[!NOTE] Generally, an ingest command is likely to include both an
ingest-by:
tag and aningestIfNotExists
property, set to the same value, as shown in the 3rd command above.
[!WARNING]
- Overusing
ingest-by
tags isn't recommended.- If the pipeline feeding Kusto is known to have data duplications, we recommend that you solve these duplications as much as possible, before ingesting the data into Kusto.
- Attempting to set a unique
ingest-by
tag for each ingestion call might result with severe impact on performance.- If such tags aren't required for some period of time after the data is ingested, we recommend that you drop extent tags.
- To drop the tags automatically, you can set an extent tags retention policy.