> ## 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.

This guide walks you through installing a driver, creating a connection, and running a SQL query.

## Step 1: List available drivers

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

This returns all CData JDBC drivers discovered in `./` and `./lib/`.

If the driver you need isn't listed, download it from CData's driver catalog (the jar is saved to `./lib` by default):

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

See [Adding drivers](./installation.mdx#adding-drivers) for more options.

## Step 2: Activate a driver

To activate a driver with a license key:

```bash theme={null}
cdatacli drivers activate Salesforce --name "John Doe" --email you@example.com --key YOUR-LICENSE-KEY
```

To start a free trial:

```bash theme={null}
cdatacli drivers activate Salesforce --name "John Doe" --email you@example.com --trial
```

## Step 3: Review connection properties

Before creating a connection, view the available connection properties for a driver:

```bash theme={null}
cdatacli drivers connectionprops Salesforce
```

## Step 4: Create a connection

```bash theme={null}
cdatacli connection create --driver "Salesforce" --name "my-salesforce" \
  --connectionstring "User=you@example.com;Password=yourpassword;SecurityToken=yourtoken"
```

The connection is saved as an encrypted `.conn` file. See [Connection files](./connections.mdx) for details.

## Step 5: Explore metadata

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

Browse available tables:

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

Browse columns for a specific table:

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

## Step 6: Run a query

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

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

Output is returned as JSON. By default, the `resultset` array contains the rows returned by the driver:

```json theme={null}
{
  "resultset" : [ {
    "Id" : "0015g00000XxYzABC",
    "Name" : "Acme Corp"
  }, {
    "Id" : "0015g00000XxYzDEF",
    "Name" : "Global Industries"
  } ]
}
```

Add `--metadata` to also include a `metadata` array describing the columns returned. See [Output format](./output.mdx) for a full explanation of the output structure.

Use `--compact` for single-line JSON output:

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