Skip to content

Commit

Permalink
Merge pull request #3 from FindHotel/fix-snowflake-stage-import
Browse files Browse the repository at this point in the history
Fix snowflake stage import
  • Loading branch information
inigofh authored Jul 20, 2020
2 parents 07c4f1f + 1054866 commit 1c3997a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.13.2
0.13.3
2 changes: 1 addition & 1 deletion pkg/snowflake/stage.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ func (sb *StageBuilder) Describe() string {

// Show returns the SQL query that will show a stage.
func (sb *StageBuilder) Show() string {
return fmt.Sprintf(`SHOW STAGES LIKE '%v' IN DATABASE "%v"`, sb.name, sb.db)
return fmt.Sprintf(`SHOW STAGES LIKE '%v' IN SCHEMA "%v"."%v"`, sb.name, sb.db, sb.schema)
}

type stage struct {
Expand Down
2 changes: 1 addition & 1 deletion pkg/snowflake/stage_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,5 +104,5 @@ func TestStageDescribe(t *testing.T) {
func TestStageShow(t *testing.T) {
r := require.New(t)
s := Stage("test_stage", "test_db", "test_schema")
r.Equal(s.Show(), `SHOW STAGES LIKE 'test_stage' IN DATABASE "test_db"`)
r.Equal(s.Show(), `SHOW STAGES LIKE 'test_stage' IN SCHEMA "test_db"."test_schema"`)
}

0 comments on commit 1c3997a

Please sign in to comment.