Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Spark & Databricks docs #248

Merged
merged 4 commits into from
May 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions spiceaidocs/docs/data-connectors/databricks.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,18 @@ Databricks as a connector for federated SQL query against Databricks using [Spar

## Configuration

`spice login databricks` can be used to configure the Databricks access token for the Spice runtime.
`spice login databricks` can be used to configure the Databricks access token for the Spice runtime.

### Parameters

- `endpoint`: The endpoint of the Databricks instance.
- `mode`: The execution mode for querying against Databricks. The default is `spark_connect`. Possible values:
- `spark_connect`: Use Spark Connect to query against Databricks.
- `s3`: Query directly from Delta Tables in S3.
- `format`: The format of the data to query. The default is `deltalake`. Only valid when `mode` is `s3`. Possible values:
- `deltalake`: Query Delta Tables.
- `databricks-cluster-id`: The ID of the compute cluster in Databricks to use for the query. Only valid when `mode` is `spark_connect`.
- `databricks_use_ssl`: If true, use a TLS connection to connect to the Databricks endpoint. Default is `true`.

### Auth

Expand All @@ -38,6 +40,7 @@ Check [Secrets Stores](/secret-stores) for more details.
```

Learn more about [File Secret Store](/secret-stores/file).

</TabItem>
<TabItem value="env" label="Env">
```bash
Expand All @@ -53,11 +56,12 @@ Check [Secrets Stores](/secret-stores) for more details.

secrets:
store: env

# <...>
```

Learn more about [Env Secret Store](/secret-stores/env).

</TabItem>
<TabItem value="k8s" label="Kubernetes">
```bash
Expand All @@ -73,11 +77,12 @@ Check [Secrets Stores](/secret-stores) for more details.

secrets:
store: kubernetes

# <...>
```

Learn more about [Kubernetes Secret Store](/secret-stores/kubernetes).

</TabItem>
<TabItem value="keyring" label="Keyring">
Add new keychain entry (macOS), with user and password in JSON string
Expand All @@ -96,11 +101,12 @@ Check [Secrets Stores](/secret-stores) for more details.

secrets:
store: keyring

# <...>
```

Learn more about [Keyring Secret Store](/secret-stores/keyring).

</TabItem>
</Tabs>

Expand Down
15 changes: 9 additions & 6 deletions spiceaidocs/docs/data-connectors/spark.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ Apache Spark as a connector for federated SQL query against a Spark Cluster usin

The Apache Spark Connector can be used in two ways: specifying a plaintext connection string using the `spark_remote` parameter or specifying a `spark_remote` secret. The connector will fail if both configurations are set.


### Parameters
- `spark_remote`: A [spark remote](https://spark.apache.org/docs/latest/spark-connect-overview.html#set-sparkremote-environment-variable) connection URI

- `spark_remote`: A [spark remote](https://spark.apache.org/docs/latest/spark-connect-overview.html#set-sparkremote-environment-variable) connection URI. Refer to [spark connect client connection string](https://github.com/apache/spark/blob/master/connector/connect/docs/client-connection-string.md) for parameters in URI.

### Auth

Expand All @@ -31,6 +31,7 @@ Check [Secrets Stores](/secret-stores) for more details.
```

Learn more about [File Secret Store](/secret-stores/file).

</TabItem>
<TabItem value="env" label="Env">
```bash
Expand All @@ -46,11 +47,12 @@ Check [Secrets Stores](/secret-stores) for more details.

secrets:
store: env

# <...>
```

Learn more about [Env Secret Store](/secret-stores/env).

</TabItem>
<TabItem value="k8s" label="Kubernetes">
```bash
Expand All @@ -66,11 +68,12 @@ Check [Secrets Stores](/secret-stores) for more details.

secrets:
store: kubernetes

# <...>
```

Learn more about [Kubernetes Secret Store](/secret-stores/kubernetes).

</TabItem>
<TabItem value="keyring" label="Keyring">
Add new keychain entry (macOS), with user and password in JSON string
Expand All @@ -89,11 +92,12 @@ Check [Secrets Stores](/secret-stores) for more details.

secrets:
store: keyring

# <...>
```

Learn more about [Keyring Secret Store](/secret-stores/keyring).

</TabItem>
</Tabs>

Expand All @@ -105,5 +109,4 @@ datasets:
name: my_table
params:
spark_remote: sc://localhost

```