You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/01/05 13:08:38 UTC

[GitHub] [airflow] mehmax commented on a change in pull request #19084: [Oracle] Oracle Hook - automatically set current_schema when defined in Connection

mehmax commented on a change in pull request #19084:
URL: https://github.com/apache/airflow/pull/19084#discussion_r778804368



##########
File path: airflow/providers/oracle/hooks/oracle.py
##########
@@ -90,8 +91,19 @@ def get_conn(self) -> 'OracleHook':
                 dsn = conn.host
                 if conn.port is not None:
                     dsn += ":" + str(conn.port)
-                if service_name or conn.schema:
-                    dsn += "/" + (service_name or conn.schema)
+                if service_name:
+                    dsn += "/" + service_name
+                elif conn.schema:
+                    self.log.warning(
+                        """You are using the parameter conn.schema to pass the Service Name
+                        of your Oracle Database. In this version of the Hook, conn.schema
+                        is additionally used to set the 'current_schema' attribute of the
+                        Oracle DB Session.
+                        Please use the correct parameter conn.extra.service_name instead to
+                        prevent future issues.
+                        More Info: https://github.com/apache/airflow/pull/19084"""
+                    )

Review comment:
       Sure, will look at it!
   I also thought of shortening the text a little. Maybe to this:
   ```
   Using conn.schema to pass the Oracle Service Name is deprecated.
   Please use conn.extra.service_name instead.
   More Info: https://github.com/apache/airflow/pull/19084
   ```
   What do you think about this?




-- 
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: commits-unsubscribe@airflow.apache.org

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