zhutong6688 commented on code in PR #32310:
URL: https://github.com/apache/superset/pull/32310#discussion_r1962048139


##########
superset/daos/database.py:
##########
@@ -165,7 +168,30 @@ def get_ssh_tunnel(cls, database_id: int) -> SSHTunnel | 
None:
         )
 
         return ssh_tunnel
-
+    
+    @classmethod
+    def is_odps_partitioned_table(cls, database: Database, table_name: str):
+        if not database:
+            raise ValueError("Database not found")
+        uri = database.sqlalchemy_uri
+        passwd = database.password
+        pattern = re.compile(
+            
r'odps://(?P<username>[^:]+):(?P<password>[^@]+)@(?P<project>[^/]+)/(?:\?endpoint=(?P<endpoint>[^&]+))'
+        )
+        match = pattern.match(unquote(uri))
+        if match:
+            access_id = match.group('username')
+            project = match.group('project')
+            endpoint = match.group('endpoint')
+        access_key = passwd

Review Comment:
   Access_key=passwd, I assigned passwd to Access_key, so that when using ODPS 
to build connections later, I have a visual experience of AK and Secret



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org

Reply via email to