Tip
If you don't already have a Teradata instance running, we recommend signing up for a free ClearScape Analytics trial.
-
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 apache-arrow-glib apache-arrow-adbc-glib
Debian/Ubuntu
sudo apt install libarrow-glib-dev libadbc-glib-dev
RHEL-compatible distributions
sudo dnf install arrow-glib-devel adbc-glib-devel
Windows with RubyInstaller/MSYS2 UCRT64
pacman -S --needed mingw-w64-ucrt-x86_64-arrow mingw-w64-ucrt-x86_64-arrow-adbc-glib
If you use a different MSYS2 environment, adjust the package prefix to match it; for example, use
mingw-w64-x86_64-*from the MINGW64 shell. -
Install Ruby dependencies:
bundle install
If you have multiple Ruby installations, ensure
rubyandbundleresolve to the same installation before running this command.
-
The ADBC driver for Teradata is available from Columnar's private driver registry. Create a Columnar Console account and activate a 14-day free trial. Then authenticate to the registry:
dbc auth login
-
Install the ADBC driver for Teradata:
dbc install --level user teradata
-
Download and install the Teradata Tools and Utilities (TTU). Select "Tools and Utilities" and choose the package for your platform. Install to the default location:
- Linux:
/opt/teradata - macOS:
/Library/Application Support/teradata - Windows:
C:\Program Files\Teradata\Client
On Windows, you can do this with
winget install Teradata.TTUBaseOn macOS with Homebrew, you can do this with
brew tap Teradata/teradata && brew install ttubasesuite - Linux:
-
Set
LD_LIBRARY_PATH(Linux),DYLD_LIBRARY_PATH(macOS), orPATH(Windows) to make sure the TTU libraries are discoverable by your application. -
Customize the Ruby script
main.rb:- Change the connection arguments in
database.set_option().uriis the URI of your Teradata instance. The format isteradata://user:password@host[:port].
- Change the SQL SELECT statement in
connection.query().
- Change the connection arguments in
-
Run the Ruby script:
bundle exec ruby main.rb