Skip to main content
Have you installed the CData CLI? This guide assumes the CLI is already on your machine. If you have not installed it yet, start with the installation guide first.
This guide walks you through activating the Salesforce driver, creating a connection, and running your first SQL query. The same steps apply to any CData driver.
1

List Available Drivers

Run the following command to see which CData JDBC drivers the CLI has discovered:
The CLI searches ./ and ./lib/ relative to the executable. If the Salesforce driver is present, it appears in the output.If the driver you need is not listed, search the CData driver catalog and download it:
The JAR is saved to ./lib/ by default. See Adding Drivers for additional options, or browse the full CData driver catalog for all available connectors.
2

Activate a Driver

Already using a CData driver? Activation does not require a separate purchase. If you have an existing CData driver license, use that license key below.
To activate with a license key:
To start a free trial instead:
3

Create a Connection

Create a named connection using your Salesforce credentials:
The connection is saved as an encrypted .conn file. See Connection Files for details on storage location and encryption.
If you are unsure which credentials a driver requires, run the following command to see all available connection properties before you connect:
4

Explore Metadata

Before building a query, browse the tables and columns available in your data source.List available tables:
List columns for a specific table:
5

Run a Query

Using the tables and columns you discovered, run a SQL query:
Output is returned as JSON. The resultset array contains the rows returned by the driver:
By default, query sql returns up to 1,000 rows and times out after 30 seconds. Use --max-rows <n> to raise or lower the row limit, and --timeout <seconds> to adjust the timeout for slower data sources.
Add --compact for single-line JSON output, which is useful for piping to other tools:
Add --metadata to include a second array describing the columns returned. See Output Format for a full explanation of the output structure.

Next Steps

  • Command Reference — full documentation for every CData CLI command
  • Connection Files — how connections are stored, encrypted, and managed
  • Output Format — understanding and customizing JSON output, including --metadata and --compact