bigquery nodejs 客户端删除数据集错误 [英] bigquery nodejs client delete dataset error

查看:26
本文介绍了bigquery nodejs 客户端删除数据集错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 nodejs 客户端在 bigquery 中创建一个临时数据集.完成任务后,我想删除此数据集.我按照 bigquery 文档中的代码做的相当简单.

I'm creating a temporary dataset in bigquery with nodejs client. When I finished my tasks I want to delete this dataset. I'm doing it fairly simple following the code in bigquery documentation.

// Creates a reference to the existing dataset
const dataset = bigquery.dataset(datasetId);

// Deletes the dataset
dataset
  .delete()
  .then(() => {
    console.log(`Dataset ${dataset.id} deleted.`);
  })
  .catch(err => {
    console.error('ERROR:', err);
});

我收到一个错误:数据集 xxx:5a58b519a3192fa942c57918 仍在使用中

推荐答案

为帮助防止您无意中删除仍包含数据的数据集,除非您先删除包含数据的表和视图,否则您将收到错误消息.删除表和视图后,您将能够删除数据集而不会出现此错误.

To help prevent you from unintentionally deleting a dataset that still contains data, you will receive an error unless you first delete and tables and views that it contains. Once you have deleted the tables and views, you will be able to delete the dataset without this error.

这篇关于bigquery nodejs 客户端删除数据集错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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