安装

注意

请参阅侧边栏中的各个驱动程序页面以获取特定安装说明。

源代码

最新的源代码版本可以从 Apache 镜像 下载。编译说明可以在 CONTRIBUTING.md 中找到。

C/C++

安装相应的驱动程序包。可以使用 conda-forgeaptdnf

conda-forge

  • mamba install libadbc-driver-flightsql

  • mamba install libadbc-driver-postgresql

  • mamba install libadbc-driver-sqlite

您可以在以下平台上使用 apt

  • Debian GNU/Linux bookworm

  • Ubuntu 22.04

准备 Apache Arrow APT 仓库

sudo apt update
sudo apt install -y -V ca-certificates lsb-release wget
sudo wget https://apache.jfrog.io/artifactory/arrow/$(lsb_release --id --short | tr 'A-Z' 'a-z')/apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb
sudo apt install -y -V ./apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb
rm ./apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb
sudo apt update

安装

  • sudo apt install libadbc-driver-flightsql-dev

  • sudo apt install libadbc-driver-postgresql-dev

  • sudo apt install libadbc-driver-sqlite-dev

  • sudo apt install libadbc-driver-snowflake-dev

您可以在以下平台上使用 dnf

  • AlmaLinux 8

  • Oracle Linux 8

  • Red Hat Enterprise Linux 8

  • AlmaLinux 9

  • Oracle Linux 9

  • Red Hat Enterprise Linux 9

准备 Apache Arrow Yum 仓库

sudo dnf install -y epel-release || sudo dnf install -y oracle-epel-release-el$(cut -d: -f5 /etc/system-release-cpe | cut -d. -f1) || sudo dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-$(cut -d: -f5 /etc/system-release-cpe | cut -d. -f1).noarch.rpm
sudo dnf install -y https://apache.jfrog.io/artifactory/arrow/almalinux/$(cut -d: -f5 /etc/system-release-cpe | cut -d. -f1)/apache-arrow-release-latest.rpm
sudo dnf config-manager --set-enabled epel || :
sudo dnf config-manager --set-enabled powertools || :
sudo dnf config-manager --set-enabled crb || :
sudo dnf config-manager --set-enabled ol$(cut -d: -f5 /etc/system-release-cpe | cut -d. -f1)_codeready_builder || :
sudo dnf config-manager --set-enabled codeready-builder-for-rhel-$(cut -d: -f5 /etc/system-release-cpe | cut -d. -f1)-rhui-rpms || :
sudo subscription-manager repos --enable codeready-builder-for-rhel-$(cut -d: -f5 /etc/system-release-cpe | cut -d. -f1)-$(arch)-rpms || :

安装

  • sudo dnf install adbc-driver-flightsql-devel

  • sudo dnf install adbc-driver-postgresql-devel

  • sudo dnf install adbc-driver-sqlite-devel

  • sudo dnf install adbc-driver-snowflake-devel

然后可以使用 CMake,例如

find_package(AdbcDriverPostgreSQL)

# ...

target_link_libraries(myapp PRIVATE AdbcDriverPostgreSQL::adbc_driver_postgresql_shared)

Go

添加对驱动程序包的依赖,例如

  • go get -u github.com/apache/arrow-adbc/go/adbc@latest

  • go get -u github.com/apache/arrow-adbc/go/adbc/driver/flightsql@latest

Java

添加对驱动程序包的依赖,例如

  • org.apache.arrow.adbc:adbc-driver-flight-sql

  • org.apache.arrow.adbc:adbc-driver-jdbc

Python

安装相应的驱动程序包。

注意

要使用 DBAPI 接口,还需要 pyarrow

例如,从 PyPI

  • pip install adbc-driver-flightsql

  • pip install adbc-driver-postgresql

  • pip install adbc-driver-snowflake

  • pip install adbc-driver-sqlite

conda-forge

  • mamba install adbc-driver-flightsql

  • mamba install adbc-driver-postgresql

  • mamba install adbc-driver-snowflake

  • mamba install adbc-driver-sqlite

R

从 CRAN 安装相应的驱动程序包

install.packages("adbcsqlite")
install.packages("adbcpostgresql")
install.packages("duckdb")

尚未在 CRAN 上提供的驱动程序可以从 GitHub 安装

# install.packages("pak")
pak::pak("apache/arrow-adbc/r/adbcflightsql")
pak::pak("apache/arrow-adbc/r/adbcsnowflake")

Ruby

安装 C/C++ 的相应驱动程序包。您可以从 Ruby 中使用它。