From aef63a6a45b032e4842debae7c766ae6fd7125c0 Mon Sep 17 00:00:00 2001 From: Aidan Feldman Date: Mon, 30 Dec 2024 04:14:54 -0500 Subject: [PATCH 1/2] fix connection Config Config heading The heading wasn't being rendered: https://pkg.go.dev/github.com/snowflakedb/gosnowflake --- doc.go | 1 + 1 file changed, 1 insertion(+) diff --git a/doc.go b/doc.go index 5df45aac5..fb81fdbb1 100644 --- a/doc.go +++ b/doc.go @@ -152,6 +152,7 @@ Session-level parameters can also be set by using the SQL command "ALTER SESSION Alternatively, use OpenWithConfig() function to create a database handle with the specified Config. # Connection Config + You can also connect to your warehouse using the connection config. The dbSql library states that when you want to take advantage of driver-specific connection features that aren’t available in a connection string. Each driver supports its own set of connection properties, often providing ways to customize the connection request specific to the DBMS For example: From f6583cc90c2c2f10de5386a8c5f7744b5a12afc8 Mon Sep 17 00:00:00 2001 From: Aidan Feldman Date: Mon, 30 Dec 2024 04:33:14 -0500 Subject: [PATCH 2/2] improve formatting in Connection Config section --- doc.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc.go b/doc.go index fb81fdbb1..f800f8070 100644 --- a/doc.go +++ b/doc.go @@ -168,12 +168,12 @@ you are looking to connect. Since the driver name is not needed, you can optiona on startup. To do this, set `GOSNOWFLAKE_SKIP_REGISTERATION` in your environment. This is useful you wish to register multiple verions of the driver. -Note: GOSNOWFLAKE_SKIP_REGISTERATION should not be used if sql.Open() is used as the method +Note: `GOSNOWFLAKE_SKIP_REGISTERATION` should not be used if sql.Open() is used as the method to connect to the server, as sql.Open will require registration so it can map the driver name to the driver type, which in this case is "snowflake" and SnowflakeDriver{}. You can load the connnection configuration with .toml file format. -With two environment variables SNOWFLAKE_HOME(connections.toml file directory) SNOWFLAKE_DEFAULT_CONNECTION_NAME(DSN name), +With two environment variables, `SNOWFLAKE_HOME` (`connections.toml` file directory) and `SNOWFLAKE_DEFAULT_CONNECTION_NAME` (DSN name), the driver will search the config file and load the connection. You can find how to use this connection way at ./cmd/tomlfileconnection or Snowflake doc: https://docs.snowflake.com/en/developer-guide/snowflake-cli-v2/connecting/specify-credentials