Note
The chDB ADBC driver supports Linux and macOS. Windows is not currently supported.
-
Ensure the native Arrow GLib and ADBC GLib libraries required by
red-adbcare installed and discoverable. Ifbundle installreports missingarrow,arrow-glib, oradbc-glib, use the platform-specific commands below.macOS with Homebrew
brew install ruby apache-arrow-glib apache-arrow-adbc-glib export PATH="$(brew --prefix ruby)/bin:$PATH"
Debian/Ubuntu
sudo apt install -y ca-certificates lsb-release wget wget https://packages.apache.org/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 ./apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb sudo apt update sudo apt install libarrow-glib-dev libadbc-glib-dev
RHEL-compatible distributions
sudo dnf install arrow-glib-devel adbc-glib-devel
-
Install Ruby dependencies:
bundle install
If you have multiple Ruby installations, ensure
rubyandbundleresolve to the same installation before running this command. On macOS, prefer Homebrew Ruby or another current Ruby distribution over the system Ruby.
-
Install the chDB ADBC driver:
dbc install --level user chdb
-
Customize the Ruby script
main.rbas needed- Change the SQL SELECT statement in
connection.query(), or keep it set toSELECT * FROM 'games.parquet';to query the Parquet file included with this example
- Change the SQL SELECT statement in
-
Run the Ruby script:
bundle exec ruby main.rb