You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`type`| Engine type name - must be `duckdb`| string | Y |
16
-
|`database`| The optional database name. If not specified, the in-memory database is used. Cannot be defined if using `catalogs`. | string | N |
17
-
|`catalogs`| Mapping to define multiple catalogs. Can [attach DuckDB catalogs](#duckdb-catalogs-example) or [catalogs for other connections](#other-connection-catalogs-example). First entry is the default catalog. Cannot be defined if using `database`. | dict | N |
18
-
|`extensions`| Extension to load into duckdb. Only autoloadable extensions are supported. | list | N |
19
-
|`connector_config`| Configuration to pass into the duckdb connector. | dict | N |
20
-
|`secrets`| Configuration for authenticating external sources (e.g., S3) using DuckDB secrets. |dict| N |
21
-
|`filesystems`| Configuration for registering `fsspec` filesystems to the DuckDB connection. | dict| N |
|`type`| Engine type name - must be `duckdb`|string| Y |
16
+
|`database`| The optional database name. If not specified, the in-memory database is used. Cannot be defined if using `catalogs`. |string| N |
17
+
|`catalogs`| Mapping to define multiple catalogs. Can [attach DuckDB catalogs](#duckdb-catalogs-example) or [catalogs for other connections](#other-connection-catalogs-example). First entry is the default catalog. Cannot be defined if using `database`. |dict| N |
18
+
|`extensions`| Extension to load into duckdb. Only autoloadable extensions are supported. |list| N |
19
+
|`connector_config`| Configuration to pass into the duckdb connector. |dict| N |
20
+
|`secrets`| Configuration for authenticating external sources (e.g., S3) using DuckDB secrets. Can be a list of secret configurations or a dictionary with custom secret names.| list/dict | N |
21
+
|`filesystems`| Configuration for registering `fsspec` filesystems to the DuckDB connection. |dict | N |
22
22
23
23
#### DuckDB Catalogs Example
24
24
@@ -194,9 +194,18 @@ DuckDB can read data directly from cloud services via extensions (e.g., [httpfs]
194
194
195
195
The `secrets` option allows you to configure DuckDB's [Secrets Manager](https://duckdb.org/docs/configuration/secrets_manager.html) to authenticate with external services like S3. This is the recommended approach for cloud storage authentication in DuckDB v0.10.0 and newer, replacing the [legacy authentication method](https://duckdb.org/docs/stable/extensions/httpfs/s3api_legacy_authentication.html) via variables.
196
196
197
-
##### Secrets Configuration Example for S3
197
+
##### Secrets Configuration
198
198
199
-
The `secrets` accepts a list of secret configurations, each defining the necessary authentication parameters for the specific service:
199
+
The `secrets` option supports two formats:
200
+
201
+
1.**List format** (default secrets): A list of secret configurations where each secret uses DuckDB's default naming
202
+
2.**Dictionary format** (named secrets): A dictionary where keys are custom secret names and values are the secret configurations
203
+
204
+
This flexibility allows you to organize multiple secrets of the same type or reference specific secrets by name in your SQL queries.
205
+
206
+
##### List Format Example (Default Secrets)
207
+
208
+
Using a list creates secrets with DuckDB's default naming:
200
209
201
210
=== "YAML"
202
211
@@ -253,6 +262,75 @@ The `secrets` accepts a list of secret configurations, each defining the necessa
253
262
)
254
263
```
255
264
265
+
##### Dictionary Format Example (Named Secrets)
266
+
267
+
Using a dictionary allows you to assign custom names to your secrets for better organization and reference:
After configuring the secrets, you can directly reference S3 paths in your catalogs or in SQL queries without additional authentication steps.
257
335
258
336
Refer to the official DuckDB documentation for the full list of [supported S3 secret parameters](https://duckdb.org/docs/stable/extensions/httpfs/s3api.html#overview-of-s3-secret-parameters) and for more information on the [Secrets Manager configuration](https://duckdb.org/docs/configuration/secrets_manager.html).
@@ -273,9 +351,9 @@ The `filesystems` accepts a list of file systems to register in the DuckDB conne
0 commit comments