Before you begin
The CData CLI requires Java 17 or later. On Windows, the installer can automatically install Adoptium JRE 17 viawinget if no compatible JRE is detected.
Windows
Run the following command in PowerShell:- Checks for a compatible JRE. If none is found, installs Adoptium JRE 17 using
winget. - Installs the CData CLI to
%APPDATA%\Programs\CData\CData CLI tool\. - Adds the install directory to your
PATH.
macOS
Run the following command in your terminal:Linux
Run the following command in your terminal:Adding drivers
Driver library directory
The CData CLI stores drivers in a single driver library directory and reads drivers only from that directory. By default, this is a per-user location, so you can reuse a driver in any project without downloading and activating it again:
To use a different directory, use either of the following. The CLI checks them in this order:
- The
-l, --lib <directory>option on a command. For example,cdatacli drivers list -l ./lib. - The
CDATACLI_HOMEenvironment variable. If the variable is set to a valid directory path, the CLI uses that directory. If it is empty or not a valid path, the CLI uses the default location.
Download a driver
The easiest way to add a driver is to download it with the CLI. First, search CData’s published driver catalog to find a driver’s artifact ID:--output <dir> to save the jar to a different directory, or --url <jar-url> to download from a direct URL instead.
Add a driver manually
You can also place driver JAR files yourself. Copy your CData JDBC driver JAR files to the driver library directory. To verify a driver is available:-l: