| duckdb_storage_config | R Documentation |
Choose where the duckdb R package keeps downloaded extensions and persisted secrets, by writing a small marker file that records the choice:
duckdb_extension_storage() – set or move the extension cache (default:
the package library when writable, otherwise a per-session temporary
directory).
duckdb_secret_storage() – set or move the secret store (default: a
per-session temporary directory).
duckdb_storage_status() – report where each currently resolves.
These functions move the cache and secret store to a location that survives across sessions; the same locations can also be set without a marker by overriding with options and environment variables. The full policy is documented in duckdb_storage.
duckdb_extension_storage(
location = c("session", "user", "shared", "library"),
...,
migrate = TRUE,
conflict = "error"
)
duckdb_secret_storage(
location = c("session", "user", "shared"),
...,
migrate = TRUE,
conflict = "error"
)
duckdb_storage_status()
location |
The destination root (not a path), one of:
To use an arbitrary directory, set the option or environment variable instead (see duckdb_storage). |
... |
These dots are for future extensions and must be empty. |
migrate |
If |
conflict |
How to resolve a name collision during migration: |
duckdb_extension_storage() and duckdb_secret_storage() write (or remove)
the marker for that one kind of state, so the two can be configured
independently. duckdb_storage_status() reports where each kind currently
resolves and which tier of the resolution policy chose it. The new location
takes effect for connections opened afterwards; existing connections are
unaffected.
There is no ask argument: calling a *_storage() function is itself the
consent to write outside the temporary directory.
The *_storage() functions are called for their side effect (writing
or removing a marker, and optionally migrating files) and return the
resolved directory invisibly. duckdb_storage_status() returns a data frame
(class "duckdb_storage_status") with one row per kind of state and columns
kind, source, and directory; its print method renders a readable
summary when the result is auto-printed.
duckdb_storage for the storage policy these functions implement.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.