duckdb.set_chain_secret()
Register a DuckDB credential-chain secret, which DuckDB resolves itself.
Usage
duckdb.set_chain_secret(
conn,
account=None,
chain="default",
)As quak::az_set_chain_secret(): PROVIDER credential_chain, so the azure extension finds a credential itself (Azure CLI, managed identity, environment, …). No chain entry uses an az login refresh token; for that, see set_credential_secret().
Parameters
conn: duckdb.DuckDBPyConnection-
The DuckDB connection.
account: str | None = None-
Scope the secret to this storage account’s hosts; it also gets
ACCOUNT_NAME. chain: str | Sequence[str] | None = "default"-
One chain entry or several (joined with
;), such as"cli"or["managed_identity", "env"];NoneleavesCHAINout.
Raises
TypeError-
accountor an entry is not a string. ValueError-
chainis an empty sequence, or an entry is empty. duckdb.Error- DuckDB refused the statement.
Notes
Delta tables never match an account-scoped secret, so register an unscoped one for them.
Examples
from dazapiz.duckdb import set_chain_secret
set_chain_secret(conn, chain="cli")