Skip to content

Commit 48b7287

Browse files
committed
address comments
1 parent ccafac5 commit 48b7287

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

wren-launcher/commands/dbt/data_source.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,14 @@ func convertToMSSQLDataSource(conn DbtConnection) (*WrenMSSQLDataSource, error)
121121
port = "1433"
122122
}
123123

124+
host := conn.Server
125+
if host == "" {
126+
host = conn.Host
127+
}
128+
124129
ds := &WrenMSSQLDataSource{
125130
Database: conn.Database,
126-
Host: conn.Server,
131+
Host: host,
127132
Port: port,
128133
User: conn.User,
129134
Password: conn.Password,

wren-launcher/commands/dbt/profiles_analyzer.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import (
55
"os"
66
"path/filepath"
77
"runtime"
8+
"strconv"
89

910
"gopkg.in/yaml.v3"
1011
)
@@ -105,6 +106,12 @@ func parseConnection(connectionMap map[string]interface{}) (*DbtConnection, erro
105106
return v
106107
case float64:
107108
return int(v)
109+
case int64:
110+
return int(v)
111+
case string:
112+
if i, err := strconv.Atoi(v); err == nil {
113+
return i
114+
}
108115
}
109116
}
110117
return 0

0 commit comments

Comments
 (0)