[英]Azure Cosmos Db trigger function to locate which exact part of document is updated
我有一個 Document Db 集合 'Col_1' 。 我還創建了一個 Azure cosmos db 觸發器函數,用於在“Col_1”中的任何文檔更新時進行檢查並采取行動。 但是,我需要確切知道從 azure 函數修改了文檔的哪一部分。 請確認是否支持,否則歡迎任何針對我的問題的解決方案。 我當前的功能代碼如下:
public static class CosmosDBTrigger
{
[FunctionName("CosmosDBTrigger")]
public static void Run([CosmosDBTrigger(
databaseName: "Coll1DB",
collectionName: "Coll_1",
ConnectionStringSetting = "DBConnection",
LeaseCollectionName = "leases")]IReadOnlyList<Document> documents, TraceWriter log)
{
if (documents != null && documents.Count > 0)
{
log.Verbose("Documents modified " + documents.Count);
log.Verbose("First document Id " + documents[0].Id);
}
}
}
任何幫助表示贊賞並提前致謝!
目前無法確定更改源中文檔的哪個部分發生了更改。 Change Feed 在更新/插入操作后返回文檔的狀態。
如果這是您想要的功能,您可以在用戶語音中為該功能投票。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.