Skip to content

Commit

Permalink
DuckDB data connector documentation (#198)
Browse files Browse the repository at this point in the history
* Added duckdb data connector documentation

* Real world example for duckdb data connector

* fix

* Update example
  • Loading branch information
Sevenannn committed Apr 15, 2024
1 parent 607b3cb commit c3884ef
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions spiceaidocs/docs/data-connectors/duckdb.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
title: "DuckDB Data Connector"
sidebar_label: "DuckDB Data Connector"
description: "DuckDB Data Connector Documentation"
---

## Dataset Source

To connect to a DuckDB [persistent database](https://duckdb.org/docs/connect/overview#persistent-database) as a data source, specify `duckdb` as the selector in the `from` value for the dataset.

```yaml
datasets:
- from: duckdb:database.schema.table
name: my_dataset
```

## Configuration

The DuckDB data connector can be configured by providing the following `params`:

- `open`: The name for the file to back the DuckDB database. `open` is a required parameter, and DuckDB run in the `file` mode to open the DuckDB database file.

Configuration `params` are provided either in the top level `dataset` for a dataset source, or in the `acceleration` section for a data store.

A generic example of DuckDB data connector configuration.

```yaml
datasets:
- from: duckdb:database.schema.table
name: my_dataset
params:
open: path/to/duckdb_file.duckdb
```

This example uses a DuckDB database file that is at location /my/path/

```yaml
datasets:
- from: duckdb:sample_data.nyc.rideshare
name: nyc_rideshare
params:
open: /my/path/my_database.db
```

0 comments on commit c3884ef

Please sign in to comment.