【发布时间】:2021-12-18 06:18:37
【问题描述】:
如果 bigtable 中不存在,我们想插入一行。我们的想法是使用带有 onNoMatch 插入的CheckAndMutateRow api。我们正在使用nodejs sdk,想法是执行以下操作(它似乎有效,但我们不知道操作的原子性)
const row = table.row('phone#4c410523#20190501');
const filter = [];
const config = {
onNoMatch: [
{
method: 'insert',
data: {
stats_summary: {
os_name: 'android',
timestamp,
},
},
},
],
};
await row.filter(filter, config);
【问题讨论】:
标签: node.js google-cloud-platform hbase bigtable