New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Release/0.9.3 #176
Release/0.9.3 #176
Conversation
85b4e63
to
02e2872
Compare
) | ||
|
||
// Specific for Snowflake db | ||
const ( | ||
loginTimeout = 5 * time.Second // by default is 60 | ||
loginTimeout = 5 * time.Second // by default is 60 | ||
multiStmtName = "multiple statement execution" // https://github.com/snowflakedb/gosnowflake/blob/e909f00ff624a7e60d4f91718f6adc92cbd0d80f/connection.go#L57-L61 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not following the relevance of this comment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just shows where this value comes from. This is what the driver also uses to determine whether it is a multi-statement query.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah ok I think I follow now. So that leads me to the follow-up - in that code it says:
// isMultiStmt returns true if the statement type code is of type multistatement
... so can we not just call isMultiStmt
instead of matching strings?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be nicer indeed, but it is unexported name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah ok ok I follow. Grand so.
@@ -30,6 +31,7 @@ func (sft SnowFlakeTarget) IsConnectable() bool { | |||
} | |||
|
|||
func NewSnowflakeTarget(target Target) *SnowFlakeTarget { | |||
// Note: region connection parameter is deprecated |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// Note: region connection parameter is deprecated
Does it still work? What is to be used in place of it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It still works as it is.
The suggestion for the region connection parameter is to be included in :account:
(https://godoc.org/github.com/snowflakedb/gosnowflake#hdr-Connection_Parameters). So it has to do with the target configuration in playbooks.
sql_runner/snowflake_target.go
Outdated
@@ -80,32 +81,42 @@ func (sft SnowFlakeTarget) RunQuery(query ReadyQuery, dryRun bool, showQueryOutp | |||
return QueryStatus{query, query.Path, 0, nil} | |||
} | |||
|
|||
scripts := strings.Split(query.Script, ";") | |||
// The MULTI_STATEMENT_COUNT parameter (through WithMultiStatement) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this comment can be much shorter eg
// 0 allows arbitrary number of statements
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! I ran some tests and behaves as I would expect.
A few nitpicks on comments, but otherwise all looks good. :)
02e2872
to
507e1e5
Compare
Just shortened the comment to |
7cedbb9
to
2958a1c
Compare
2958a1c
to
75f01d9
Compare
75f01d9
to
e857de0
Compare
6b4abf3
to
15612b6
Compare
15612b6
to
528b2ac
Compare
No description provided.