Skip to content

Commit

Permalink
Abort Detached Queries.
Browse files Browse the repository at this point in the history
  • Loading branch information
Tang8330 committed Apr 25, 2024
1 parent f16981d commit a58a846
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions clients/snowflake/snowflake.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,21 @@ func (s *Store) reestablishConnection() error {
return nil
}

params := make(map[string]*string)

// https://docs.snowflake.com/en/sql-reference/parameters#abort-detached-query
params["ABORT_DETACHED_QUERY"] = ptr.ToString(fmt.Sprint(true))

cfg := &gosnowflake.Config{
Account: s.config.Snowflake.AccountID,
User: s.config.Snowflake.Username,
Password: s.config.Snowflake.Password,
Warehouse: s.config.Snowflake.Warehouse,
Region: s.config.Snowflake.Region,
Application: s.config.Snowflake.Application,

// Try this as our params.
Params: params,
}

if s.config.Snowflake.Host != "" {
Expand Down

0 comments on commit a58a846

Please sign in to comment.