# @google-cloud/bigtable 中文文档

规范地址：https://npmcn.com/package/%40google-cloud/bigtable/

版本：7\.5\.1
npm 元数据更新时间：2026-10-29T00:16:34.828Z
中文译文更新时间：2026-11-16T19:46:06.205Z
软件包许可：Apache-2\.0

本文由上游 README 翻译，可能存在偏差，请结合原文核对 API、命令与配置。版权与许可归原作者所有。

原始 npm 页面：https://www.npmjs.com/package/%40google-cloud/bigtable
原文对照：https://npmcn.com/package/%40google-cloud/bigtable/?lang=original
项目主页：https://github.com/googleapis/google-cloud-node/tree/main/handwritten/bigtable
源码仓库：https://github.com/googleapis/google-cloud-node

## 关键信息（来自 npm 元数据）

- 包体积（解压后）：1.2 MB，165 个文件
- 模块格式：CommonJS
- TypeScript 类型：包内自带
- Node.js 要求：\>=22
- 运行依赖：26 个
- 首次发布：2016-08-11T19:23:28.457Z
- 最新版本发布：2026-10-29T00:16:34.597Z
- 近 30 天下载量：1285864（2026-10-17 至 2026-11-15，npm 官方下载统计）
- 已发布版本数：102（近 12 个月 9 个）

## 中文简介

Cloud 节点客户端库

## 安装

```sh
npm install @google-cloud/bigtable
```

也可以使用：`pnpm add @google-cloud/bigtable`、`yarn add @google-cloud/bigtable`、`bun add @google-cloud/bigtable`

## README

![Google Cloud Platform logo](https://avatars2.githubusercontent.com/u/2810941?v=3&s=96 "Google Cloud Platform")

# [云大表:节点.js客户端](https://github.com/googleapis/nodejs-bigtable)

[![release level](https://img.shields.io/badge/release%20level-stable-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![npm version](https://img.shields.io/npm/v/@google-cloud/bigtable.svg)](https://www.npmjs.com/package/@google-cloud/bigtable)

Cloud 节点客户端库

各版本的更改一览表载于 [变化](https://github.com/googleapis/nodejs-bigtable/blob/main/CHANGELOG.md)。 。 。 .

-   [Cloud Bigtable Node.js 客户端 API 参考文献](https://cloud.google.com/nodejs/docs/reference/bigtable/latest)
-   [云大表文档](https://cloud.google.com/bigtable)
-   [github.com/googleapis/nodejs-bigtable (英语)](https://github.com/googleapis/nodejs-bigtable)

更多信息,请访问Cloud APIs的客户端库,包括老年人 Google APIs 客户端图书馆, in [客户端图书馆解释](https://cloud.google.com/apis/docs/client-libraries-explained)。 。 。 .

**目录 :**

-   [快速启动](https://npmcn.com/package/%40google-cloud/bigtable/#readme-quickstart)
    -   [在你开始之前](https://npmcn.com/package/%40google-cloud/bigtable/#readme-before-you-begin)
    -   [安装客户端库](https://npmcn.com/package/%40google-cloud/bigtable/#readme-installing-the-client-library)
    -   [使用客户端库](https://npmcn.com/package/%40google-cloud/bigtable/#readme-using-the-client-library)
-   [样本](https://npmcn.com/package/%40google-cloud/bigtable/#readme-samples)
-   [版本](https://npmcn.com/package/%40google-cloud/bigtable/#readme-versioning)
-   [捐款](https://npmcn.com/package/%40google-cloud/bigtable/#readme-contributing)
-   [许可证](https://npmcn.com/package/%40google-cloud/bigtable/#readme-license)

## 快速启动

### 在你开始之前

1.  [选择或创建云平台项目](https://console.cloud.google.com/project)。 。 。 .
2.  [启用您的工程计费](https://support.google.com/cloud/answer/6293499#enable-billing)。 。 。 .
3.  [启用 Cloud 大表 API](https://console.cloud.google.com/flows/enableapi?apiid=bigtable.googleapis.com)。 。 。 .
4.  [设置认证](https://cloud.google.com/docs/authentication/external/set-up-adc-local) 这样你就可以访问 当地工作站的API.

### 安装客户端库

```bash
npm install @google-cloud/bigtable
```

### 使用客户端库

```javascript
// Imports the Google Cloud client library
const {Bigtable} = require('@google-cloud/bigtable');

const bigtable = new Bigtable();

async function quickstart() {
  // Connect to an existing instance:my-bigtable-instance
  const instance = bigtable.instance(INSTANCE_ID);

  // Connect to an existing table:my-table
  const table = instance.table(TABLE_ID);

  // Read a row from my-table using a row key
  const [singleRow] = await table.row('r1').get();

  // Print the row key and data (column value, labels, timestamp)
  const rowData = JSON.stringify(singleRow.data, null, 4);
  console.log(`Row key: ${singleRow.id}\nData: ${rowData}`);
}
quickstart();

```

## 样本

样本在 [`samples/`](https://github.com/googleapis/nodejs-bigtable/tree/main/samples) 目录。 每个样本 `README.md` 有运行样本的指示.

| 样本 | 源代码 | 试试看 |
| --- | --- | --- |
| 删除片断 | [源代码](https://github.com/googleapis/nodejs-bigtable/blob/main/samples/deleteSnippets.js) | [![Open in Cloud Shell](https://gstatic.com/cloudssh/images/open-btn.png)](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigtable&page=editor&open_in_editor=samples/deleteSnippets.js,samples/README.md) |
| 过滤片段 | [源代码](https://github.com/googleapis/nodejs-bigtable/blob/main/samples/filterSnippets.js) | [![Open in Cloud Shell](https://gstatic.com/cloudssh/images/open-btn.png)](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigtable&page=editor&open_in_editor=samples/filterSnippets.js,samples/README.md) |
| 实例 | [源代码](https://github.com/googleapis/nodejs-bigtable/blob/main/samples/instances.js) | [![Open in Cloud Shell](https://gstatic.com/cloudssh/images/open-btn.png)](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigtable&page=editor&open_in_editor=samples/instances.js,samples/README.md) |
| 快速启动 | [源代码](https://github.com/googleapis/nodejs-bigtable/blob/main/samples/quickstart.js) | [![Open in Cloud Shell](https://gstatic.com/cloudssh/images/open-btn.png)](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigtable&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) |
| 读取片段 | [源代码](https://github.com/googleapis/nodejs-bigtable/blob/main/samples/readSnippets.js) | [![Open in Cloud Shell](https://gstatic.com/cloudssh/images/open-btn.png)](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigtable&page=editor&open_in_editor=samples/readSnippets.js,samples/README.md) |
| 表格管理员 | [源代码](https://github.com/googleapis/nodejs-bigtable/blob/main/samples/tableadmin.js) | [![Open in Cloud Shell](https://gstatic.com/cloudssh/images/open-btn.png)](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigtable&page=editor&open_in_editor=samples/tableadmin.js,samples/README.md) |
| 写批 | [源代码](https://github.com/googleapis/nodejs-bigtable/blob/main/samples/writeBatch.js) | [![Open in Cloud Shell](https://gstatic.com/cloudssh/images/open-btn.png)](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigtable&page=editor&open_in_editor=samples/writeBatch.js,samples/README.md) |
| 有条件地写入 | [源代码](https://github.com/googleapis/nodejs-bigtable/blob/main/samples/writeConditionally.js) | [![Open in Cloud Shell](https://gstatic.com/cloudssh/images/open-btn.png)](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigtable&page=editor&open_in_editor=samples/writeConditionally.js,samples/README.md) |
| 写入增量 | [源代码](https://github.com/googleapis/nodejs-bigtable/blob/main/samples/writeIncrement.js) | [![Open in Cloud Shell](https://gstatic.com/cloudssh/images/open-btn.png)](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigtable&page=editor&open_in_editor=samples/writeIncrement.js,samples/README.md) |
| 简单插入 | [源代码](https://github.com/googleapis/nodejs-bigtable/blob/main/samples/writeSimple.js) | [![Open in Cloud Shell](https://gstatic.com/cloudssh/images/open-btn.png)](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigtable&page=editor&open_in_editor=samples/writeSimple.js,samples/README.md) |

这个 [Cloud Bigtable Node.js 客户端 API 参考文献](https://cloud.google.com/nodejs/docs/reference/bigtable/latest) 文档 还包含样品.

## 支持的节点.js版本

我们的客户端图书馆跟着 [节点.js发布时间表](https://github.com/nodejs/release#release-schedule)。 。 。 . 图书馆兼容所有当前 _活动_ 财务报告和审定财务报表 _维修_ 版本 节点.js. 如果你在使用"节点"(Node.js)的报废版本,我们建议你更新 尽快到积极支持的LTS版本.

Google 的客户端库支持在 a 上的 Node.js runtimes 的遗留版本 以下列警告为依据:

-   后遗症版本不进行连续整合测试.
-   一些安全补丁和特性不能被后移植.
-   依赖关系不能不断更新.

设有针对Node.js的一些报废版本的客户端图书馆,以及 可以通过 npm 安装 [秒数](https://docs.npmjs.com/cli/dist-tag)。 。 。 . 立面遵循命名惯例 `legacy-(version)`。 。 。 . 譬如说, `npm install @google-cloud/bigtable@legacy-8` 安装客户端库 用于兼容Node.js 8的版本.

## 版本

这个图书馆跟随 [语义版本](http://semver.org/)。 。 。 .

这个图书馆被认为是 **稳定**。代码表面不会改变向后兼容的方式 除非绝对必要(例如,由于关键的安全问题)或 大量贬值期。 问题和要求 **稳定** 图书馆 以最高优先处理.

更多信息 : [谷歌云平台启动阶段](https://cloud.google.com/terms/launch-stages)

## 捐款

欢迎捐款! 见 [贡献指南](https://github.com/googleapis/nodejs-bigtable/blob/main/CONTRIBUTING.md)。 。 。 .

请注意: `README.md`,则 `samples/README.md`, (中文(简体) ), 和该寄存器中的各种配置文件(包括 `.nycrc` 财务报告和审定财务报表 `tsconfig.json`(中文(简体) ) 从中央模板生成。 要编辑这些文件之一, 请编辑 输入模板 [目录](https://github.com/googleapis/synthtool)。 。 。 .

## 许可证

Apache 版本 2.0

见 [自由主义](https://github.com/googleapis/nodejs-bigtable/blob/main/LICENSE)

## 常见问题

### @google-cloud/bigtable 是什么？

Cloud 节点客户端库

### 如何安装 @google-cloud/bigtable？

在项目目录运行 npm install @google-cloud/bigtable，或使用 pnpm add / yarn add / bun add。

### @google-cloud/bigtable 支持 TypeScript 吗？

支持。包内自带 TypeScript 类型声明（package\.json 声明了 types 入口），安装后即可获得类型提示，无需再安装 @types 包。

### @google-cloud/bigtable 支持 ESM 还是 CommonJS？

以 CommonJS 形式发布，可以直接 require\(\)；在 ES Module 项目中也可以用 import 引入（Node\.js 会把 module\.exports 作为默认导出）。

### @google-cloud/bigtable 需要什么版本的 Node\.js？

package\.json 的 engines 字段要求 Node\.js \>=22。版本不符时 npm 默认只给出警告，开启 engine-strict 后会拒绝安装。

### @google-cloud/bigtable 可以商用吗？

@google-cloud/bigtable 使用 Apache-2\.0 许可。宽松许可：允许商业使用、修改和再分发，并附带明确的专利授权；分发时需保留许可与 NOTICE 文件，修改过的文件要注明改动。以上为概括，不构成法律意见，请以许可原文为准。

### @google-cloud/bigtable 的下载量有多少？

根据 npm 官方下载统计，@google-cloud/bigtable 在 2026/10/17 – 2026/11/15 这 30 天内被下载 1,285,864 次，日均约 42,862 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入，适合横向比较热度，不能直接等同于使用人数。

### @google-cloud/bigtable 还在维护吗？

最新版本 7\.5\.1 发布于 2026/10/29（18 天前）；至今共发布 102 个版本，其中过去 12 个月发布了 9 个；首次发布于 2016/08/12。发布频率只是参考信号：功能稳定的工具可能很少需要更新，建议结合源码仓库的 issue 和提交记录判断。

