Skip to content

Commit 856ac3e

Browse files
committed
fix rebase conflict
1 parent 2e6f012 commit 856ac3e

File tree

1 file changed

+2
-31
lines changed

1 file changed

+2
-31
lines changed

wren-launcher/commands/dbt/data_source.go

Lines changed: 2 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -121,35 +121,6 @@ func convertToPostgresDataSource(conn DbtConnection) (*WrenPostgresDataSource, e
121121
User: conn.User,
122122
Password: conn.Password,
123123
}
124-
// If no port is specified, use PostgreSQL default port
125-
if ds.Port == 0 {
126-
ds.Port = 5432
127-
}
128-
129-
return ds, nil
130-
}
131-
132-
func convertToMSSQLDataSource(conn DbtConnection) (*WrenMSSQLDataSource, error) {
133-
port := strconv.Itoa(conn.Port)
134-
if conn.Port == 0 {
135-
port = "1433"
136-
}
137-
138-
host := conn.Server
139-
if host == "" {
140-
host = conn.Host
141-
}
142-
143-
ds := &WrenMSSQLDataSource{
144-
Database: conn.Database,
145-
Host: host,
146-
Port: port,
147-
User: conn.User,
148-
Password: conn.Password,
149-
TdsVersion: "8.0", // the default tds version for Wren engine image
150-
Driver: "ODBC Driver 18 for SQL Server", // the driver used by Wren engine image
151-
Kwargs: map[string]interface{}{"TrustServerCertificate": "YES"},
152-
}
153124

154125
return ds, nil
155126
}
@@ -368,11 +339,11 @@ func (ds *WrenMSSQLDataSource) Validate() error {
368339
func (ds *WrenMSSQLDataSource) MapType(sourceType string) string {
369340
// This method is not used in WrenMSSQLDataSource, but required by DataSource interface
370341
switch strings.ToLower(sourceType) {
371-
case "char", "nchar":
342+
case charType, "nchar":
372343
return charType
373344
case varcharType, "nvarchar":
374345
return varcharType
375-
case "text", "ntext":
346+
case textType, "ntext":
376347
return textType
377348
case "bit", "tinyint":
378349
return booleanType

0 commit comments

Comments
 (0)