# @altimateai/dbt-integration 中文文档

规范地址：https://npmcn.com/package/%40altimateai/dbt-integration/

版本：0\.3\.17
npm 元数据更新时间：2026-11-05T12:33:14.340Z
中文译文更新时间：2026-11-06T15:58:01.686Z
软件包许可：MIT

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

原始 npm 页面：https://www.npmjs.com/package/%40altimateai/dbt-integration
原文对照：https://npmcn.com/package/%40altimateai/dbt-integration/?lang=original

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

- 包体积（解压后）：4.3 MB，102 个文件
- 模块格式：ESM + CJS
- TypeScript 类型：包内自带
- Node.js 要求：\>=18
- 运行依赖：5 个
- 首次发布：2025-06-30T01:34:26.257Z
- 最新版本发布：2026-11-05T12:33:14.130Z
- 近 30 天下载量：2814（2026-10-06 至 2026-11-04，npm 官方下载统计）
- 已发布版本数：44（近 12 个月 29 个）

## 中文简介

Dbt 集成的替代类型Script库

## 安装

```sh
npm install @altimateai/dbt-integration
```

也可以使用：`pnpm add @altimateai/dbt-integration`、`yarn add @altimateai/dbt-integration`、`bun add @altimateai/dbt-integration`

## README

# @altimateai/dbt-整合

一个全面的TypeScript库,为dbt(数据构建工具)项目提供统一的集成层. 支持多个dbt部署策略,包括dbt Core,dbt Cloud,dbt Fusion,以及命令行执行.

## 特征

-   **多重融合战略**:支持dbt Core (Python Bridge),dbt Cloud API,dbt Fusion,以及基于CLI的处决
-   **统一接口**: 框架不可知性 `DBTFacade` 所有 dbt 操作的接口
-   **显示解析**: 完成dbt显示的解析,包括模型、来源、测试、宏观、暴露和度量
-   **依赖性图**: 构建并分析 dbt 项目依赖图和家族
-   **Python 集成**: 有 dbt- core 的直接 Python 桥集成
-   **类型安全**: 包含全面类型定义的完整类型脚本支持

## 安装

```bash
npm install @altimateai/dbt-integration
# or
yarn add @altimateai/dbt-integration
```

**所需资源**:节点.js 18+

### 设置

```bash
yarn install
```

### 图标

#### 构建

-   `yarn build` - 建立图书馆(CJS、无害环境管理和类型脚本申报)
-   `yarn dev` - 以监视模式构建

#### 测试

-   `yarn test` - 运行杰斯特测试套房
-   `yarn test:watch` - 在监视模式下进行测试
-   `yarn test:coverage` - 生成测试覆盖报告
-   `yarn test:integration` - 进行整合测试

#### 代码质量

-   `yarn lint` - 运行ESLint
-   `yarn lint:fix` - 解决ESLint问题
-   `yarn format` - 有Pretier格式代码
-   `yarn format:check` - 检查代码格式
-   `yarn typecheck` - 运行类型脚本类型检查

### 出版

1.  更新版本于 `package.json`
2.  构建库 : `yarn build`
3.  发布到 npm : `npm publish`

通常通过 `.github/workflows/publish.yml` 当 GitHub 发布时 发表。 如果这个事件被放弃——一个GitHub Actions事件对Mcp-engine的确是这样的 `v0.7.0` 发布 — 同样的发布可以由手开始而不是重新剪切发布:

```bash
gh workflow run publish.yml --ref main -f ref=v0.3.14                   # publish that tag
gh workflow run publish.yml --ref main -f ref=v0.3.14 -f dry_run=true   # validate without publishing
```

`--ref` 选择运行工作流程的复制件, 所以保持它运行 `main`: 此触发前的标记剪切 不存在 `workflow_dispatch`。 。 。 . `-f ref=` 选择要发表的内容.

输入 : `ref` (teg/ref发布从,默认到ref运行开始), `dist_tag` (违约) `latest`,或 `beta` 用于预发版本),以及 `dry_run`。所发布的版本是 总是一个在 `package.json` 在那个裁判时,从不使用标签名称,如果 这个版本已经在npm上——所以 **凸起 `package.json` 在标记之前.**

库配置有:

-   类型安全的脚本
-   捆绑的起伏
-   测试游戏
-   代码质量的 ESLint 和 Pretier
-   钩子的胡斯基
-   对常规承诺的承诺
-   在测试中嘲笑API的MSW

### 提交公约

这个项目使用 [常规武器委员会](https://www.conventionalcommits.org/)。有效承诺类型:

-   `feat`: 新特性
-   `fix`: 错误修正
-   `docs`: 文件更改
-   `style`: 代码样式变化(格式化等)
-   `refactor`: 代码重构
-   `perf`改进业绩
-   `test`: 测试更改
-   `build`: 构建系统更改
-   `ci`: CI/CD 更改
-   `chore`: 其他变化
-   `revert`: 恢复上一个承诺

## 许可证

麻省理工学院

## 常见问题

### @altimateai/dbt-integration 是什么？

Dbt 集成的替代类型Script库

### 如何安装 @altimateai/dbt-integration？

在项目目录运行 npm install @altimateai/dbt-integration，或使用 pnpm add / yarn add / bun add。

### @altimateai/dbt-integration 支持 TypeScript 吗？

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

### @altimateai/dbt-integration 支持 ESM 还是 CommonJS？

同时提供 ES Module 与 CommonJS 入口，import 和 require\(\) 都可以使用，打包工具会自动选择合适的版本。

### @altimateai/dbt-integration 需要什么版本的 Node\.js？

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

### @altimateai/dbt-integration 可以商用吗？

@altimateai/dbt-integration 使用 MIT 许可。宽松许可：允许商业使用、修改和再分发，通常只需在分发时保留原版权与许可声明。以上为概括，不构成法律意见，请以许可原文为准。

### @altimateai/dbt-integration 的下载量有多少？

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

### @altimateai/dbt-integration 还在维护吗？

最新版本 0\.3\.17 发布于 2026/11/05（2 天前）；至今共发布 44 个版本，其中过去 12 个月发布了 29 个；首次发布于 2025/06/30。发布频率只是参考信号：功能稳定的工具可能很少需要更新，建议结合源码仓库的 issue 和提交记录判断。

