Skip to content

Commit

Permalink
added Snowplow_ in application name and appName to Target
Browse files Browse the repository at this point in the history
  • Loading branch information
TiganeteaRobert committed Apr 19, 2022
1 parent 1104363 commit 094322e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions config/snowflake.yml.sample
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ targets:
host: # Leave blank
port: # Leave blank
ssl: true # Snowflake connection is always secured by TLS
appname: my_database # final application name is Snowplow_my_database
variables:
foo: bar
steps:
Expand Down
2 changes: 1 addition & 1 deletion sql_runner/playbook.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ type Playbook struct {

type Target struct {
Name, Type, Host, Database, Port, Username,
Password, Region, Account, Warehouse, Project string
Password, Region, Account, Warehouse, Project, AppName string
Ssl bool
}

Expand Down
4 changes: 2 additions & 2 deletions sql_runner/snowflake_target.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (

// Specific for Snowflake db
const (
snowplowAppName = `Snowplow_OSS`
snowplowAppName = `Snowplow_`
loginTimeout = 5 * time.Second // by default is 60
multiStmtName = "multiple statement execution" // https://github.com/snowflakedb/gosnowflake/blob/e909f00ff624a7e60d4f91718f6adc92cbd0d80f/connection.go#L57-L61
)
Expand Down Expand Up @@ -62,7 +62,7 @@ func NewSnowflakeTarget(target Target) *SnowFlakeTarget {
Database: target.Database,
Warehouse: target.Warehouse,
LoginTimeout: loginTimeout,
Application: snowplowAppName,
Application: snowplowAppName + target.AppName,
})

if err != nil {
Expand Down

0 comments on commit 094322e

Please sign in to comment.