> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cli.cdata.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Quick Start

> Download a driver, connect to a data source, and run your first SQL query in minutes.

> [!NOTE]
>
> **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](https://docs.cli.cdata.com/installation.md) 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:

```bash theme={null}
cdatacli drivers list
```

The CLI reads drivers from the [driver library directory](https://docs.cli.cdata.com/installation.md#driver-library-directory).
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:

```bash theme={null}
cdatacli drivers search --driver salesforce
cdatacli drivers download --artifact-id salesforce-jdbc
```

The JAR is saved to the driver library directory by default. See [Adding Drivers](https://docs.cli.cdata.com/installation.md#adding-drivers)
for additional options, or browse the
[full CData driver catalog](https://www.cdata.com/drivers/) for all available connectors.

**2. Activate a Driver**

> [!NOTE]
>
> **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:

```bash theme={null}
cdatacli drivers activate Salesforce \
  --name "<YOUR_NAME>" \
  --email <YOUR_EMAIL> \
  --key <YOUR_LICENSE_KEY>
```

To start a free trial instead:

```bash theme={null}
cdatacli drivers activate Salesforce \
  --name "<YOUR_NAME>" \
  --email <YOUR_EMAIL> \
  --trial
```

**3. Create a Connection**

Create a named connection using your Salesforce credentials:

```bash theme={null}
cdatacli connection create \
  --driver "Salesforce" \
  --name "my-salesforce" \
  --connectionstring "User=<YOUR_EMAIL>;Password=<YOUR_PASSWORD>;SecurityToken=<YOUR_SECURITY_TOKEN>"
```

The connection is saved as an encrypted `.conn` file. See [Connection Files](https://docs.cli.cdata.com/connections.md)
for details on storage location and encryption.

> [!TIP]
>
> If you are unsure which credentials a driver requires, run the following command to see all
> available connection properties before you connect:
>
> ```bash theme={null}
> cdatacli drivers connectionprops Salesforce
> ```

**4. Explore Metadata**

Before building a query, browse the tables and columns available in your data source.

List available tables:

```bash theme={null}
cdatacli metadata tables --connection "my-salesforce"
```

List columns for a specific table:

```bash theme={null}
cdatacli metadata columns --connection "my-salesforce" --table "Account"
```

**5. Run a Query**

Using the tables and columns you discovered, run a SQL query:

```bash theme={null}
cdatacli query sql \
  --connection "my-salesforce" \
  --sql "SELECT Id, Name, Industry FROM Account LIMIT 5"
```

Output is returned as JSON. The `resultset` array contains the rows returned by the driver:

```json theme={null}
{
  "resultset" : [ {
    "Id" : "0015g00000XxYzABC",
    "Name" : "Acme Corp",
    "Industry" : "Technology"
  }, {
    "Id" : "0015g00000XxYzDEF",
    "Name" : "Global Industries",
    "Industry" : "Manufacturing"
  }, {
    "Id" : "0015g00000XxYzGHI",
    "Name" : "Bright Solutions",
    "Industry" : "Finance"
  } ]
}
```

> [!NOTE]
>
> 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:

```bash theme={null}
cdatacli query sql \
  --connection "my-salesforce" \
  --sql "SELECT Id, Name FROM Account LIMIT 5" \
  --compact
```

Add `--metadata` to include a second array describing the columns returned. See
[Output Format](https://docs.cli.cdata.com/output.md) for a full explanation of the output structure.

## Next Steps

* [Command Reference](https://docs.cli.cdata.com/commands.md) — full documentation for every CData CLI command
* [Connection Files](https://docs.cli.cdata.com/connections.md) — how connections are stored, encrypted, and managed
* [Output Format](https://docs.cli.cdata.com/output.md) — understanding and customizing JSON output, including `--metadata` and `--compact`


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.