diff --git a/docs/backends/snowflake.qmd b/docs/backends/snowflake.qmd index 0f50c2fcad92..ecf218080ff2 100644 --- a/docs/backends/snowflake.qmd +++ b/docs/backends/snowflake.qmd @@ -131,11 +131,41 @@ con = ibis.snowflake.connect( ```python con = ibis.connect( - f"snowflake://{user}@{account}/{database}?warehouse={warehouse}", + f"snowflake://{user}@{account}/{database}/{schema}?warehouse={warehouse}", authenticator="externalbrowser", ) ``` +### Authenticating with Key Pair Authentication + +Ibis supports connecting to Snowflake warehouses using private keys. + +You can use it in the explicit-parameters-style or in the URL-style connection +APIs. + +#### Explicit + +```python +con = ibis.snowflake.connect( + user="user", + account="safpqpq-sq55555", + database="my_database", + schema="my_schema", + warehouse="my_warehouse", + # extracted private key from .p8 file + private_key=os.getenv(SNOWFLAKE_PKEY), +) +``` + +#### URL + +```python +con = ibis.connect( + f"snowflake://{user}@{account}/{database}/{schema}?warehouse={warehouse}", + private_key=os.getenv(SNOWFLAKE_PKEY), +) +``` + ### Looking up your Snowflake organization ID and user ID A [Snowflake account