Skip to content

Commit

Permalink
Snowflake support
Browse files Browse the repository at this point in the history
  • Loading branch information
mbobrovskyi committed Dec 19, 2017
1 parent 3305a44 commit 1d01e5b
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions sql_runner/snowflake_target.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package main

import (
"database/sql"
"fmt"
"log"
"time"
sf "github.com/snowflakedb/gosnowflake"
Expand Down Expand Up @@ -35,8 +34,6 @@ func NewSnowflakeTarget(target Target) *SnowFlakeTarget {
log.Fatal(err)
}

fmt.Println("CONFIG:", configStr)

db, err := sql.Open("snowflake", configStr)

if err != nil {
Expand Down Expand Up @@ -69,7 +66,9 @@ func (sft SnowFlakeTarget) RunQuery(query ReadyQuery, dryRun bool) QueryStatus {

res, err = sft.Client.Exec(script)

if err == nil {
if err != nil {
return QueryStatus{query, query.Path, int(affected), err}
} else {
aff, _ := res.RowsAffected()
affected += aff
}
Expand Down

0 comments on commit 1d01e5b

Please # to comment.