Skip to content

Commit

Permalink
exp: databricks connection timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
achettyiitr committed Aug 25, 2024
1 parent a5adab3 commit 01c52e7
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 9 deletions.
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,12 @@ require (
github.com/rudderlabs/analytics-go v3.3.3+incompatible
github.com/rudderlabs/bing-ads-go-sdk v0.2.3
github.com/rudderlabs/compose-test v0.1.3
github.com/rudderlabs/rudder-go-kit v0.36.1
github.com/rudderlabs/rudder-go-kit v0.36.2
github.com/rudderlabs/rudder-observability-kit v0.0.3
github.com/rudderlabs/rudder-schemas v0.5.0
github.com/rudderlabs/rudder-transformer/go v0.0.0-20240812044419-23196ec42acf
github.com/rudderlabs/sql-tunnels v0.1.7
github.com/rudderlabs/sqlconnect-go v1.7.4
github.com/rudderlabs/sqlconnect-go v1.8.1-0.20240825140355-f91530be1999
github.com/samber/lo v1.46.0
github.com/segmentio/go-hll v1.0.1
github.com/segmentio/kafka-go v0.4.47
Expand Down Expand Up @@ -183,7 +183,7 @@ require (
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/dgraph-io/ristretto v0.1.1 // indirect
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
github.com/dlclark/regexp2 v1.11.2 // indirect
github.com/dlclark/regexp2 v1.11.4 // indirect
github.com/dnephin/pflag v1.0.7 // indirect
github.com/docker/cli v26.1.3+incompatible // indirect
github.com/docker/go-connections v0.5.0 // indirect
Expand Down
12 changes: 6 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -443,8 +443,8 @@ github.com/dimfeld/httptreemux v5.0.1+incompatible h1:Qj3gVcDNoOthBAqftuD596rm4w
github.com/dimfeld/httptreemux v5.0.1+incompatible/go.mod h1:rbUlSV+CCpv/SuqUTP/8Bk2O3LyUV436/yaRGkhP6Z0=
github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk=
github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E=
github.com/dlclark/regexp2 v1.11.2 h1:/u628IuisSTwri5/UKloiIsH8+qF2Pu7xEQX+yIKg68=
github.com/dlclark/regexp2 v1.11.2/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8=
github.com/dlclark/regexp2 v1.11.4 h1:rPYF9/LECdNymJufQKmri9gV604RvvABwgOA8un7yAo=
github.com/dlclark/regexp2 v1.11.4/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8=
github.com/dnaeon/go-vcr v1.1.0/go.mod h1:M7tiix8f0r6mKKJ3Yq/kqU1OYf3MnfmBWVbPx/yU9ko=
github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ=
github.com/dnephin/pflag v1.0.7 h1:oxONGlWxhmUct0YzKTgrpQv9AUA1wtPBn7zuSjJqptk=
Expand Down Expand Up @@ -1133,8 +1133,8 @@ github.com/rudderlabs/compose-test v0.1.3 h1:uyep6jDCIF737sfv4zIaMsKRQKX95IDz5Xb
github.com/rudderlabs/compose-test v0.1.3/go.mod h1:tuvS1eQdSfwOYv1qwyVAcpdJxPLQXJgy5xGDd/9XmMg=
github.com/rudderlabs/parquet-go v0.0.2 h1:ZXRdZdimB0PdJtmxeSSxfI0fDQ3kZjwzBxRi6Ut1J8k=
github.com/rudderlabs/parquet-go v0.0.2/go.mod h1:g6guum7o8uhj/uNhunnt7bw5Vabu/goI5i21/3fnxWQ=
github.com/rudderlabs/rudder-go-kit v0.36.1 h1:6yP1gVAhfPiIvNqJRSt8I7lOzNJCBw8a7BSjwpbcmUM=
github.com/rudderlabs/rudder-go-kit v0.36.1/go.mod h1:ujLsnvECNg013S6Wv8r24vyN/hkhv6De1ydugnPKy/o=
github.com/rudderlabs/rudder-go-kit v0.36.2 h1:jqLqglUnDovvAzAiO0Z9ZBe8g7svoPDCGaN47f0FDwo=
github.com/rudderlabs/rudder-go-kit v0.36.2/go.mod h1:ujLsnvECNg013S6Wv8r24vyN/hkhv6De1ydugnPKy/o=
github.com/rudderlabs/rudder-observability-kit v0.0.3 h1:vZtuZRkGX+6rjaeKtxxFE2YYP6QlmAcVcgecTOjvz+Q=
github.com/rudderlabs/rudder-observability-kit v0.0.3/go.mod h1:6UjAh3H6rkE0fFLh7z8ZGQEQbKtUkRfhWOf/OUhfqW8=
github.com/rudderlabs/rudder-schemas v0.5.0 h1:+140Amou92sB4ZXwsX3jgRIdjNfERJJgYOx0bcUkxzg=
Expand All @@ -1143,8 +1143,8 @@ github.com/rudderlabs/rudder-transformer/go v0.0.0-20240812044419-23196ec42acf h
github.com/rudderlabs/rudder-transformer/go v0.0.0-20240812044419-23196ec42acf/go.mod h1:3NGitPz4pYRRZ6Xt09S+8hb0tHK/9pZcKJ3OgOTaSmE=
github.com/rudderlabs/sql-tunnels v0.1.7 h1:wDCRl6zY4M5gfWazf7XkSTGQS3yjBzUiUgEMBIfHNDA=
github.com/rudderlabs/sql-tunnels v0.1.7/go.mod h1:5f7+YL49JHYgteP4rAgqKnr4K2OadB0oIpUS+Tt3sPM=
github.com/rudderlabs/sqlconnect-go v1.7.4 h1:whPX9fVajRimm3gnYpxY1ZOS1YvN94x8R6cAu8fCR5I=
github.com/rudderlabs/sqlconnect-go v1.7.4/go.mod h1:F57aZlJoVxkFHl0xvjDbkOEDDyJHaGfSvD3Dwrk/7BQ=
github.com/rudderlabs/sqlconnect-go v1.8.1-0.20240825140355-f91530be1999 h1:NflGeZ461mzbcKmvaopwndGrnvOA6CNIrlHI4VuNNFo=
github.com/rudderlabs/sqlconnect-go v1.8.1-0.20240825140355-f91530be1999/go.mod h1:sO4IdIRDIlKMjxb9u3HoNoKRsYz2NKUjMocLY9vPumE=
github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/ruudk/golang-pdf417 v0.0.0-20181029194003-1af4ab5afa58/go.mod h1:6lfFZQK844Gfx8o5WFuvpxWRwnSoipWe/p622j1v06w=
Expand Down
6 changes: 6 additions & 0 deletions warehouse/integrations/deltalake/deltalake.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ import (
"strings"
"time"

"github.com/google/uuid"

"github.com/rudderlabs/sqlconnect-go/sqlconnect"
sqlconnectconfig "github.com/rudderlabs/sqlconnect-go/sqlconnect/config"

Expand Down Expand Up @@ -228,7 +230,11 @@ func (d *Deltalake) connect() (*sqlmiddleware.DB, error) {
return nil, fmt.Errorf("marshalling credentials: %w", err)
}

log := d.logger.Withn(logger.NewStringField("id", uuid.NewString()))
start := time.Now()
log.Infon("connecting to databricks")
sqlConnectDB, err := sqlconnect.NewDB("databricks", credentialsJSON)
log.Infon("connected to databricks", logger.NewDurationField("duration", time.Since(start)))
if err != nil {
return nil, fmt.Errorf("creating sqlconnect db: %w", err)
}
Expand Down

0 comments on commit 01c52e7

Please sign in to comment.