【发布时间】:2017-02-27 18:07:11
【问题描述】:
我正在使用 node 和 Azure Functions 来使用 functions.json 中定义的绑定来更新我的 azure 表。我能够使用出绑定插入行,但找不到任何有关如何更新它们的文档。
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();
});
再次调用上面的函数没有效果。
我知道我可以使用 sdk 手动更新表格,但我想使用绑定并尽可能保持功能简单。
【问题讨论】:
标签: node.js azure azure-functions azure-webjobssdk