From 1c869122def4fb0fd4c66e1cd13b61cd42bee45e Mon Sep 17 00:00:00 2001 From: Shulin Chen Date: Wed, 18 Jan 2023 14:31:54 -0800 Subject: [PATCH] Ensure role is set prior to db/schema setting (#64) --- src/snowcli/snow_connector.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/snowcli/snow_connector.py b/src/snowcli/snow_connector.py index 588359a989..a5403a367a 100644 --- a/src/snowcli/snow_connector.py +++ b/src/snowcli/snow_connector.py @@ -111,8 +111,8 @@ def uploadFileToStage( schema, overwrite, ): - self.cs.execute(f"use database {database}") self.cs.execute(f"use role {role}") + self.cs.execute(f"use database {database}") self.cs.execute(f"use schema {schema}") self.cs.execute( f"create stage if not exists {destination_stage} "