如何使用绑定更新Azure函数中的Azure表行? [英] How to update a Azure table row in Azure function using Bindings?

查看:55
本文介绍了如何使用绑定更新Azure函数中的Azure表行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用node和Azure Functions通过functions.json中定义的绑定来更新我的azure表.我能够使用out绑定插入行,但是找不到有关如何更新行的任何文档.

I am using node and Azure Functions to update my azure table using Bindings defined in functions.json. I was able to insert rows using out binding but can't find any documentation on how to update them.

Functions.json

{
      "tableName": "myTable",
      "connection": "myTableConnectionString",
      "name": "tableBinding",
      "type": "table",
      "direction": "out"
    }

功能定义

Promise.map(loaders.map(e => e.getData()), (data) => {
    context.log("pushing to azure table");

    context.bindings.tableBinding.push({
      PartitionKey: data.key,
      RowKey: data.key,
      Value: data.Value
    });
  })
    .then(() => {
      context.log("Completed all data retrieveal tasks");
      context.log('JavaScript timer trigger function ran!', timeStamp);
      context.done();
    });

再次调用上面的函数无效.

Calling the function above again has no effect.

我知道我可以使用sdk手动更新表,但是我想使用绑定并使函数尽可能简单.

I understand that I can use the sdk to manually update the table but I would like to use the bindings and keep the function as simple as possible.

推荐答案

Azure WebJobs SDK尚不支持此功能,因此它也无法在Azure Functions中使用.

Looks like this is not yet supported by Azure WebJobs SDK so it doesn't work in Azure Functions either.

在github存储库积压中发现了一个问题,要求相同的功能 https://github.com/Azure/azure-webjobs-sdk/issues/919

Found an issue in the github repository backlog requesting the same feature https://github.com/Azure/azure-webjobs-sdk/issues/919

这篇关于如何使用绑定更新Azure函数中的Azure表行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆