You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sedona.apache.org by ji...@apache.org on 2024/05/08 02:28:00 UTC

(sedona) branch master updated: [SEDONA-555] Snowflake Native App should not always create a new role (#1401)

This is an automated email from the ASF dual-hosted git repository.

jiayu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sedona.git


The following commit(s) were added to refs/heads/master by this push:
     new f01f7a582 [SEDONA-555] Snowflake Native App should not always create a new role (#1401)
f01f7a582 is described below

commit f01f7a58239f849511a991c2a8c404d82a597753
Author: Jia Yu <ji...@apache.org>
AuthorDate: Tue May 7 19:27:55 2024 -0700

    [SEDONA-555] Snowflake Native App should not always create a new role (#1401)
---
 .../main/java/org/apache/sedona/snowflake/snowsql/ddl/DDLGenerator.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/snowflake/src/main/java/org/apache/sedona/snowflake/snowsql/ddl/DDLGenerator.java b/snowflake/src/main/java/org/apache/sedona/snowflake/snowsql/ddl/DDLGenerator.java
index ccbd0084c..dc60890c4 100644
--- a/snowflake/src/main/java/org/apache/sedona/snowflake/snowsql/ddl/DDLGenerator.java
+++ b/snowflake/src/main/java/org/apache/sedona/snowflake/snowsql/ddl/DDLGenerator.java
@@ -81,7 +81,7 @@ public class DDLGenerator {
             }
             stageName = "";
             System.out.println("-- Generating DDL for Snowflake Native App");
-            System.out.println("CREATE APPLICATION ROLE " + appRoleName + ";");
+            System.out.println("CREATE APPLICATION ROLE IF NOT EXISTS " + appRoleName + ";");
             System.out.println("CREATE OR ALTER VERSIONED SCHEMA sedona;");
             System.out.println("GRANT USAGE ON SCHEMA sedona TO APPLICATION ROLE " + appRoleName + ";");
         }