dbc

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

dbc Skill

dbc Skill

Install and manage drivers for the user with the dbc command line program.
使用dbc命令行程序为用户安装和管理驱动。

Installing dbc

安装dbc

If the user does not have
dbc
available, try to install it for them.
Prefer installing it with with these commands, in order of preference, if the tool is available:
  • If
    uv
    is available:
    uv tool install dbc
  • If
    pipx
    is available:
    pipx install dbc
  • Otherwise install dbc with the appropriate command for their operating system:
    • macOS & Linux: Run
      curl -LsSf https://dbc.columnar.tech/install.sh | sh
    • Windows: Run
      powershell -ExecutionPolicy ByPass -c "irm https://dbc.columnar.tech/install.ps1 | iex"
如果用户尚未安装
dbc
,尝试为其安装。
优先按照以下顺序使用对应命令进行安装(若工具可用):
  • uv
    可用:
    uv tool install dbc
  • pipx
    可用:
    pipx install dbc
  • 否则根据用户的操作系统使用相应命令安装:
    • macOS & Linux:运行
      curl -LsSf https://dbc.columnar.tech/install.sh | sh
    • Windows:运行
      powershell -ExecutionPolicy ByPass -c "irm https://dbc.columnar.tech/install.ps1 | iex"

Most Important Commands

核心命令

  • dbc install <driver>
    - Install a driver (e.g.,
    dbc install snowflake
    )
  • dbc search [pattern]
    - Search for a driver using a pattern (e.g.,
    dbc search sql
    ). Also lists installed drivers.
  • dbc info <driver>
    - Get driver details
Run
dbc --help
to learn about other commands.
  • dbc install <driver>
    - 安装驱动(例如:
    dbc install snowflake
  • dbc search [pattern]
    - 使用匹配模式搜索驱动(例如:
    dbc search sql
    ),同时会列出已安装的驱动。
  • dbc info <driver>
    - 获取驱动详情
运行
dbc --help
了解其他命令。

Project Workflow

项目工作流

For reproducible driver management, prefer using this workflow over
dbc install
:
  1. dbc init
    - Create a
    dbc.toml
    file
  2. dbc add <driver>
    - Add drivers to the list (supports version constraints like
    dbc add "postgresql>=13.0"
    )
  3. dbc sync
    - Install all drivers and create
    dbc.lock
为了实现可复现的驱动管理,优先使用以下工作流而非直接使用
dbc install
  1. dbc init
    - 创建
    dbc.toml
    文件
  2. dbc add <driver>
    - 将驱动添加到列表中(支持版本约束,例如
    dbc add "postgresql>=13.0"
  3. dbc sync
    - 安装所有驱动并生成
    dbc.lock

Using Drivers

使用驱动

Drivers installed with dbc must be used with an ADBC driver manager. dbc cannot load a driver or query a data source directly. Don't install drivers from any other source like PyPI, prefer drivers installed with dbc always.
Resources for using drivers:
通过dbc安装的驱动必须配合ADBC驱动管理器使用。dbc无法直接加载驱动或查询数据源。请勿从PyPI等其他来源安装驱动,始终优先使用dbc安装的驱动。
使用驱动的相关资源: