This page contains information about connecting Looker to Apache Spark 3.

Looker connects to Apache Spark 3+ through a JDBC connection to the Spark Thrift Server.

> [!NOTE]
> **Note:** Looker does not support connections to Apache Spark 1.5 or Apache Spark 2. Queries on connections to Apache Spark 1.5 or Apache Spark 2 will return an error.

## Encrypting network traffic

It is a best practice to encrypt network traffic between the Looker application and your database. Consider one of the options that are described on the [Enabling secure database access](https://docs.cloud.google.com/looker/docs/enabling-secure-db-access.md.txt) documentation page.

## Creating the Looker connection to your database

In the **Admin** section of Looker, select **Connections** , and then click **Add Connection**.

Fill out the connection details. The majority of the settings are common to most database dialects. See the [Connecting Looker to your database](https://docs.cloud.google.com/looker/docs/connecting-to-your-db.md.txt) documentation page for information. Some of the settings are described next:

- **Name**: The name of the connection. This is how the connection will be referred to in the LookML model.
- **Dialect** : Select **Apache Spark 3+**.
- **Host**: The Thrift server host.
- **Port** The Thrift server port (10000 by default).
- **Database**: The default schema or database that will be modeled. When no database is specified for a table, this will be assumed.
- **Username**: The user that Looker will authenticate as.
- **Password**: The optional password for Looker user.
- **Enable PDTs** : Use this toggle to enable [persistent derived tables](https://docs.cloud.google.com/looker/docs/derived-tables.md.txt#persistent-derived-tables). When PDTs are enabled, the **Connection** window reveals additional PDT settings and the [**PDT Overrides**](https://docs.cloud.google.com/looker/docs/connecting-to-your-db.md.txt#pdt-overrides) section.
- **Temp Database** : A temporary schema or database for storing PDTs. It must be created beforehand, with a statement such as `CREATE SCHEMA looker_scratch;`.
- **Additional JDBC parameters** : Add any additional JDBC parameters. See the [Supported JDBC parameters](https://docs.cloud.google.com/looker/docs/db-config-apache-spark.md.txt#jdbc-supported) section on this page for a list of supported parameters.
- **SSL**: Leave this unchecked.
- **Database Time Zone**: The time zone of data stored in Spark. Usually it can be left blank or set to UTC.
- **Query Time Zone**: The time zone to display data queried in Looker.

To verify that the connection is successful, click the **Test Connection** button in the **Status details** section at the bottom of the **Connections Settings** page.

If Looker displays **Can Connect** , press **Connect** to create the connection.

Your database connection is then added to the list on the Looker [**Connections**](https://docs.cloud.google.com/looker/docs/admin-panel-database-connections.md.txt) **Admin** page.

## Supported JDBC parameters

For Apache Spark, Looker supports the following JDBC parameters in the [**Additional JDBC parameters**](https://docs.cloud.google.com/looker/docs/connecting-to-your-db.md.txt#additional_jdbc_parameters) field for the connection. See the documentation for your database for information on these parameters.

- `batchsize`
- `cascadeTruncate`
- `connectionProvider`
- `createTableColumnTypes`
- `createTableOptions`
- `customSchema`
- `dbtable`
- `fetchsize`
- `isolationLevel`
- `keytab`
- `lowerBound`
- `numPartitions`
- `oracle.jdbc.mapDateToTimestamp`
- `partitionColumn`
- `password`
- `preferTimestampNTZ`
- `prepareQuery`
- `principal`
- `pushDownAggregate`
- `pushDownLimit`
- `pushDownOffset`
- `pushDownPredicate`
- `pushDownTableSample`
- `query`
- `queryTimeout`
- `sessionInitStatement`
- `truncate`
- `upperBound`
- `url`
- `user`

## Feature support

For Looker to support some features, your database dialect must also support them.

### Apache Spark 3+

Apache Spark 3+ supports the following features as of Looker 26.22:

| Feature | Supported? |
|---|---|
| Looker (Google Cloud core) | Yes |
| Symmetric aggregates | Yes |
| Derived tables | Yes |
| Persistent SQL derived tables | Yes |
| Persistent native derived tables | Yes |
| Stable views | Yes |
| Query killing | Yes |
| SQL-based pivots | Yes |
| Time zones | Yes |
| SSL | Yes |
| Subtotals | Yes |
| JDBC additional params | Yes |
| Case-sensitive | Yes |
| Location type | Yes |
| List type | Yes |
| Percentile | Yes |
| Distinct percentile | No |
| SQL Runner Show Processes | No |
| SQL Runner Describe Table | Yes |
| SQL Runner Show Indexes | No |
| SQL Runner Select 10 | Yes |
| SQL Runner Count | Yes |
| SQL Explain | Yes |
| OAuth 2.0 credentials | No |
| Context comments | Yes |
| Connection pooling | No |
| HLL sketches | No |
| Aggregate awareness | Yes |
| Incremental PDTs | No |
| Milliseconds | Yes |
| Microseconds | Yes |
| Materialized views | No |
| Period-over-period measures | No |
| Approximate count distinct | No |
| In-database analytic models | No |
| Custom calendars | Yes |

## Next steps

After you have created the connection, [set authentication options](https://docs.cloud.google.com/looker/docs/getting-started-with-users.md.txt).