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

Jack/24 03 15 #116

Merged
merged 5 commits into from
Mar 15, 2024
Merged
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
58 changes: 28 additions & 30 deletions spiceaidocs/content/en/reference/Connectors/s3.md
Original file line number Diff line number Diff line change
@@ -1,44 +1,42 @@
---
type: docs
title: "S3 Parquet Dataset"
linkTitle: "S3 Parquet Dataset"
description: 'S3 Parquet Dataset YAML reference'
title: "S3 Data Connector"
linkTitle: "S3 Data Connector"
description: 'S3 Data Connector YAML reference'
weight: 80
---

Parquet data in S3-compatible storage can be queried in mesh mode or accelerated locally.

# `dataset`

```yaml
- from: s3://s3-bucket-name/path/to/parquet/file.parquet
name: s3_file
auth: s3
params:
endpoint: https://your.minio.host
region: ""
acceleration:
enabled: true
refresh_mode: full
```
S3 as a connector for federated SQL query across Parquet files stored in S3, or S3-compatible storage solutions (e.g. Minio, Cloudflare R2).

## `params`

- `endpoint`: Check `with_endpoint` in [object store](https://docs.rs/object_store/latest/object_store/aws/struct.AmazonS3Builder.html)
- `region`: Check `with_region` in [object store](https://docs.rs/object_store/latest/object_store/aws/struct.AmazonS3Builder.html)

## `acceleration`

Optional.

When `null`, query will run in mesh mode; parquet data will be read directly from the object store for each query.

Only `full` refresh mode is supported.
- `endpoint`: The S3 endpoint, or equivalent (e.g. Minio endpoint), for the S3-compatible storage.
- `region`: Region of the S3 bucket, if region specific.

## `auth`

Check [Secrets]({{<ref "reference/Secrets">}}).

Required attribbutes:
- `key`
- `secret`
- `key`: The access key authorised to access the S3 data (e.g. `AWS_ACCESS_KEY_ID` for AWS)
- `secret`The secret key authorised to access the S3 data (e.g. `AWS_SECRET_ACCESS_KEY` for AWS)


## Example
### Minio
```yaml
- from: s3://s3-bucket-name/path/to/parquet/cool_dataset.parquet
name: cool_dataset
params:
endpoint: https://my.minio.server
region: "us-east-1" # Best practice for Minio
```

#### S3
```yaml
- from: s3://my-startups-data/path/to/parquet/cool_dataset.parquet
name: cool_dataset
params:
endpoint: http://my-startups-data.s3.amazonaws.com
region: "ap-southeast-2"
```
Loading