From d41ad27a0dec43bb622ad92797eeec107ab246b3 Mon Sep 17 00:00:00 2001 From: inigofh Date: Mon, 20 Jul 2020 12:09:53 +0200 Subject: [PATCH 1/2] Use schema in stage show statement --- VERSION | 2 +- pkg/snowflake/stage.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index 3f8dcd03d2..8eb5b22f25 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.13.2 \ No newline at end of file +0.13.3 \ No newline at end of file diff --git a/pkg/snowflake/stage.go b/pkg/snowflake/stage.go index 474c78c2f0..f6a8703e53 100644 --- a/pkg/snowflake/stage.go +++ b/pkg/snowflake/stage.go @@ -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 { From 10548666dee3535d542ab47865314810779bcf07 Mon Sep 17 00:00:00 2001 From: inigofh Date: Mon, 20 Jul 2020 12:14:25 +0200 Subject: [PATCH 2/2] Adapt stage show test to new statement --- pkg/snowflake/stage_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/snowflake/stage_test.go b/pkg/snowflake/stage_test.go index e40933d1d2..ab34fd9479 100644 --- a/pkg/snowflake/stage_test.go +++ b/pkg/snowflake/stage_test.go @@ -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"`) }