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/09/27 20:40:30 UTC

[GitHub] [airflow] fritz-astronomer opened a new pull request, #26730: Correct the description of "schema"

fritz-astronomer opened a new pull request, #26730:
URL: https://github.com/apache/airflow/pull/26730

   misleading - the schema property actually needs to be the database property, as [per source code](https://github.com/apache/airflow/blob/06acf40a4337759797f666d5bb27a5a393b74fed/airflow/providers/microsoft/mssql/hooks/mssql.py#L103)


-- 
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


[GitHub] [airflow] dstandish commented on pull request #26730: Correct the description of "schema"

Posted by GitBox <gi...@apache.org>.
dstandish commented on PR #26730:
URL: https://github.com/apache/airflow/pull/26730#issuecomment-1302603366

   looks like just needs rebase


-- 
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


[GitHub] [airflow] kaxil commented on pull request #26730: Correct the description of "schema"

Posted by GitBox <gi...@apache.org>.
kaxil commented on PR #26730:
URL: https://github.com/apache/airflow/pull/26730#issuecomment-1260054752

   cc @feluelle This is similar to https://github.com/apache/airflow/pull/26436


-- 
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


[GitHub] [airflow] potiuk commented on pull request #26730: Correct the description of "schema"

Posted by GitBox <gi...@apache.org>.
potiuk commented on PR #26730:
URL: https://github.com/apache/airflow/pull/26730#issuecomment-1303587968

   I saw it and rebased. Strange you couldn't :) (it appears when the fork has permission to update PR by maintainers - which is "on" by default when you fork).


-- 
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


[GitHub] [airflow] github-actions[bot] commented on pull request #26730: Correct the description of "schema"

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #26730:
URL: https://github.com/apache/airflow/pull/26730#issuecomment-1358661722

   This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 5 days if no further activity occurs. Thank you for your contributions.


-- 
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


[GitHub] [airflow] fritz-astronomer commented on a diff in pull request #26730: Correct the description of "schema"

Posted by GitBox <gi...@apache.org>.
fritz-astronomer commented on code in PR #26730:
URL: https://github.com/apache/airflow/pull/26730#discussion_r981750831


##########
airflow/providers/microsoft/mssql/hooks/mssql.py:
##########
@@ -51,6 +51,15 @@ def __init__(
         self.schema = kwargs.pop("schema", None)
         self._sqlalchemy_scheme = sqlalchemy_scheme
 
+    @staticmethod
+    def get_ui_field_behaviour() -> Dict[str, Any]:
+        """Returns custom UI field behaviour for MSSQL Connection."""
+        return {
+            "relabeling": {
+                "schema": "Database",
+            },

Review Comment:
   https://github.com/apache/airflow/pull/26732



-- 
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


[GitHub] [airflow] ashb commented on a diff in pull request #26730: Correct the description of "schema"

Posted by GitBox <gi...@apache.org>.
ashb commented on code in PR #26730:
URL: https://github.com/apache/airflow/pull/26730#discussion_r981733705


##########
airflow/providers/microsoft/mssql/hooks/mssql.py:
##########
@@ -51,6 +51,15 @@ def __init__(
         self.schema = kwargs.pop("schema", None)
         self._sqlalchemy_scheme = sqlalchemy_scheme
 
+    @staticmethod
+    def get_ui_field_behaviour() -> Dict[str, Any]:
+        """Returns custom UI field behaviour for MSSQL Connection."""
+        return {
+            "relabeling": {
+                "schema": "Database",
+            },

Review Comment:
   Lets add this to base DB api hook instead -- it'll right for all the subclasses much more than calling it schema currently is!



-- 
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


[GitHub] [airflow] dstandish commented on a diff in pull request #26730: Correct the description of "schema"

Posted by GitBox <gi...@apache.org>.
dstandish commented on code in PR #26730:
URL: https://github.com/apache/airflow/pull/26730#discussion_r1013346332


##########
airflow/providers/microsoft/mssql/hooks/mssql.py:
##########
@@ -51,6 +51,15 @@ def __init__(
         self.schema = kwargs.pop("schema", None)
         self._sqlalchemy_scheme = sqlalchemy_scheme
 
+    @staticmethod
+    def get_ui_field_behaviour() -> Dict[str, Any]:
+        """Returns custom UI field behaviour for MSSQL Connection."""
+        return {
+            "relabeling": {
+                "schema": "Database",
+            },

Review Comment:
   inheritance doesn't work for these methods though unfortunately.
   
   aside... one thing that's unfortunate about relabeling is it doesn't help much when defining creds in env vars.  for that case it's a bit nicer to have them named properly as extras... though not much to do about that now i guess.



-- 
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


[GitHub] [airflow] dstandish commented on pull request #26730: Correct the description of "schema"

Posted by GitBox <gi...@apache.org>.
dstandish commented on PR #26730:
URL: https://github.com/apache/airflow/pull/26730#issuecomment-1303006628

   tests didn't run, can you rebase again... not sure why i don't see the option to do so...


-- 
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


[GitHub] [airflow] github-actions[bot] closed pull request #26730: Correct the description of "schema"

Posted by GitBox <gi...@apache.org>.
github-actions[bot] closed pull request #26730: Correct the description of "schema"
URL: https://github.com/apache/airflow/pull/26730


-- 
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