dbc
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinesedbc 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 available, try to install it for them.
dbcPrefer installing it with with these commands, in order of preference, if the tool is available:
- If is available:
uvuv tool install dbc - If is available:
pipxpipx 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"
- macOS & Linux: Run
如果用户尚未安装,尝试为其安装。
dbc优先按照以下顺序使用对应命令进行安装(若工具可用):
- 若可用:
uvuv tool install dbc - 若可用:
pipxpipx 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"
- macOS & Linux:运行
Most Important Commands
核心命令
- - Install a driver (e.g.,
dbc install <driver>)dbc install snowflake - - Search for a driver using a pattern (e.g.,
dbc search [pattern]). Also lists installed drivers.dbc search sql - - Get driver details
dbc info <driver>
Run to learn about other commands.
dbc --help- - 安装驱动(例如:
dbc install <driver>)dbc install snowflake - - 使用匹配模式搜索驱动(例如:
dbc search [pattern]),同时会列出已安装的驱动。dbc search sql - - 获取驱动详情
dbc info <driver>
运行了解其他命令。
dbc --helpProject Workflow
项目工作流
For reproducible driver management, prefer using this workflow over :
dbc install- - Create a
dbc initfiledbc.toml - - Add drivers to the list (supports version constraints like
dbc add <driver>)dbc add "postgresql>=13.0" - - Install all drivers and create
dbc syncdbc.lock
为了实现可复现的驱动管理,优先使用以下工作流而非直接使用:
dbc install- - 创建
dbc init文件dbc.toml - - 将驱动添加到列表中(支持版本约束,例如
dbc add <driver>)dbc add "postgresql>=13.0" - - 安装所有驱动并生成
dbc syncdbc.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:
- How to load drivers and connect to databases: https://github.com/columnar-tech/adbc-quickstarts
- Python Cookbooks for ADBC: https://arrow.apache.org/adbc/current/python/recipe/index.html
通过dbc安装的驱动必须配合ADBC驱动管理器使用。dbc无法直接加载驱动或查询数据源。请勿从PyPI等其他来源安装驱动,始终优先使用dbc安装的驱动。
使用驱动的相关资源:
- 如何加载驱动并连接数据库:https://github.com/columnar-tech/adbc-quickstarts
- ADBC Python使用指南:https://arrow.apache.org/adbc/current/python/recipe/index.html