【问题标题】:How to edit azure storage table from azure function?如何从 azure 函数编辑 azure 存储表?
【发布时间】:2017-07-04 06:19:44
【问题描述】:

我可以使用下面的代码在表格中添加新行

context.bindings.sampleTable = {
"partitionKey": "11111111",
"rowKey": "222",
"deviceId": 1111,
"messageId": 2222,
"temperature": 3333,
"humidity": 4444
 };

 context.done();

现在我想编辑这个新添加的行,所以我尝试使用相同的 partitionkeyrowkey 相同的代码,但它给出了如下错误

Exception while executing function: Functions.CCCJSFunc. Microsoft.Azure.WebJobs.Host: Error while handling parameter _binder after function returned:. Microsoft.WindowsAzure.Storage: The specified entity already exists.

所以请纠正我。

【问题讨论】:

    标签: azure azure-functions azure-table-storage


    【解决方案1】:

    线程How to update a Azure table row in Azure function using Bindings? 解决了同样的问题。目前,如果您需要任意更新/删除等,您必须使用Azure Storage SDK for Node.js 手动执行此操作。

    您可以查看这篇博文:Updating and Deleting Table Storage Entities with Azure Functions (C# and JavaScript) 以了解解决方法。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-07-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-07-17
      • 1970-01-01
      • 1970-01-01
      • 2020-12-12
      相关资源
      最近更新 更多