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 2021/04/16 17:11:01 UTC

[GitHub] [airflow] sunkickr opened a new pull request #15408: Add Connection Documentation to more Providers

sunkickr opened a new pull request #15408:
URL: https://github.com/apache/airflow/pull/15408


   This PR adds and updates documentation for connecting to some popular providers. It also adds links to this documentation in the doc strings of modules that use each connection. Documentation for the following connections is improved or updated:
   
   - ftp
   - sftp
   - ssh
   - snowflake
   


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

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



[GitHub] [airflow] potiuk commented on pull request #15408: Add Connection Documentation to more Providers

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


   @eladkal care for re-review? 


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

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



[GitHub] [airflow] potiuk commented on a change in pull request #15408: Add Connection Documentation to more Providers

Posted by GitBox <gi...@apache.org>.
potiuk commented on a change in pull request #15408:
URL: https://github.com/apache/airflow/pull/15408#discussion_r619688934



##########
File path: airflow/providers/sftp/hooks/sftp.py
##########
@@ -45,9 +45,12 @@ class SFTPHook(SSHHook):
           permissions.
 
     Errors that may occur throughout but should be handled downstream.
+
+    :param sftp_conn_id: The :ref:`sftp connection id<howto/connection:sftp>`
+    :type sftp_conn_id: str
     """
 
-    conn_name_attr = 'ftp_conn_id'
+    conn_name_attr = 'sftp_conn_id'

Review comment:
       This change is wrong.
   
   It should remain ftp_conn_id because this is the name of the constructor argument (below:
   ```
       def __init__(self, ftp_conn_id: str = 'sftp_default', *args, **kwargs) -> None:
   ```
   
   It is later remapped to "ssh_conn_id" just before running the constructor of the parent class, so it does not matter. Note that it is just a name used when the connection is instantiated dynamically so it does not really matter what it is is, as long as it is consistent. And if someone ever created the Hook manually with keyword argument, changing it would mean backwards incompatibility as mentioned by @uranusjr 

##########
File path: docs/apache-airflow-providers-snowflake/connections/snowflake.rst
##########
@@ -0,0 +1,76 @@
+.. Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+ ..   http://www.apache.org/licenses/LICENSE-2.0
+
+ .. Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+
+
+
+.. _howto/connection:snowflake:
+
+Snowflake Connection
+====================
+
+The Snowflake connection type enables integrations with Snowflake.
+
+Authenticating to Snowflake
+---------------------------
+
+Authenticate to Snowflake using the `Snowflake python connector default authentication
+<https://docs.snowflake.com/en/user-guide/python-connector-example.html#connecting-using-the-default-authenticator>`_.
+
+Default Connection IDs
+----------------------
+
+Hooks, operators, and sensors related to Snowflake use ``snowflake_default`` by default.
+
+Configuring the Connection
+--------------------------
+
+Login
+    Specify the snowflake username.
+
+Password
+    Specify the snowflake password.
+
+Host (optional)
+    Specify the snowflake hostname.
+
+Schema (optional)
+    Specify the snowflake schema to be used.
+
+Extra (optional)
+    Specify the extra parameters (as json dictionary) that can be used in the snowflake connection.
+    The following parameters are all optional:
+
+    * ``account``: Snowflake account name.
+    * ``database``: Snowflake database name.
+    * ``region``: Warehouse region.
+    * ``warehouse``: Snowflake warehouse name.
+    * ``role``: Snowflake role.
+    * ``authenticator``: To connect using OAuth set this parameter ``oath``
+    * ``private_key_file``: Specify the path to the private key file.
+    * ``session_parameters``: Specify `session level parameters
+      <https://docs.snowflake.com/en/user-guide/python-connector-example.html#setting-session-parameters>`_

Review comment:
       Agree with @sunkickr. This documentation is mostly for those who want to define the connnections manually rather than via UI. When you configure the connection via UI you have dedicated fields, but when you create it manually via cli or env variable, those need to be extras (the UI remaps values to extras). I think it's best to leave it as it is - users of Airlfow know how it works, and even if not, the UI fields for those "custom" connections have enough description/are clear enough. And in case you have those custom fields, extra is not even visible in the UI, so it is pretty clear what's going on I think.




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

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



[GitHub] [airflow] eladkal commented on a change in pull request #15408: Add Connection Documentation to more Providers

Posted by GitBox <gi...@apache.org>.
eladkal commented on a change in pull request #15408:
URL: https://github.com/apache/airflow/pull/15408#discussion_r615024146



##########
File path: docs/apache-airflow-providers-snowflake/connections/snowflake.rst
##########
@@ -0,0 +1,76 @@
+.. Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+ ..   http://www.apache.org/licenses/LICENSE-2.0
+
+ .. Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+
+
+
+.. _howto/connection:snowflake:
+
+Snowflake Connection
+====================
+
+The Snowflake connection type enables integrations with Snowflake.
+
+Authenticating to Snowflake
+---------------------------
+
+Authenticate to Snowflake using the `Snowflake python connector default authentication
+<https://docs.snowflake.com/en/user-guide/python-connector-example.html#connecting-using-the-default-authenticator>`_.
+
+Default Connection IDs
+----------------------
+
+Hooks, operators, and sensors related to Snowflake use ``snowflake_default`` by default.
+
+Configuring the Connection
+--------------------------
+
+Login
+    Specify the snowflake username.
+
+Password
+    Specify the snowflake password.
+
+Host (optional)
+    Specify the snowflake hostname.
+
+Schema (optional)
+    Specify the snowflake schema to be used.
+
+Extra (optional)
+    Specify the extra parameters (as json dictionary) that can be used in the snowflake connection.
+    The following parameters are all optional:
+
+    * ``account``: Snowflake account name.
+    * ``database``: Snowflake database name.
+    * ``region``: Warehouse region.
+    * ``warehouse``: Snowflake warehouse name.
+    * ``role``: Snowflake role.
+    * ``authenticator``: To connect using OAuth set this parameter ``oath``
+    * ``private_key_file``: Specify the path to the private key file.
+    * ``session_parameters``: Specify `session level parameters
+      <https://docs.snowflake.com/en/user-guide/python-connector-example.html#setting-session-parameters>`_

Review comment:
       Is this section correct? https://github.com/apache/airflow/pull/14724




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

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



[GitHub] [airflow] sunkickr commented on pull request #15408: Add Connection Documentation to more Providers

Posted by GitBox <gi...@apache.org>.
sunkickr commented on pull request #15408:
URL: https://github.com/apache/airflow/pull/15408#issuecomment-826134766


   @potiuk I have reverted the incompatibly change and rebased to the latest master.


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

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



[GitHub] [airflow] sunkickr commented on a change in pull request #15408: Add Connection Documentation to more Providers

Posted by GitBox <gi...@apache.org>.
sunkickr commented on a change in pull request #15408:
URL: https://github.com/apache/airflow/pull/15408#discussion_r619691934



##########
File path: airflow/providers/sftp/hooks/sftp.py
##########
@@ -45,9 +45,12 @@ class SFTPHook(SSHHook):
           permissions.
 
     Errors that may occur throughout but should be handled downstream.
+
+    :param sftp_conn_id: The :ref:`sftp connection id<howto/connection:sftp>`
+    :type sftp_conn_id: str
     """
 
-    conn_name_attr = 'ftp_conn_id'
+    conn_name_attr = 'sftp_conn_id'

Review comment:
       @potiuk @uranusjr thanks for the review. I did not fully understand how this worked, I'll change it back!




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

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



[GitHub] [airflow] eladkal commented on a change in pull request #15408: Add Connection Documentation to more Providers

Posted by GitBox <gi...@apache.org>.
eladkal commented on a change in pull request #15408:
URL: https://github.com/apache/airflow/pull/15408#discussion_r615024146



##########
File path: docs/apache-airflow-providers-snowflake/connections/snowflake.rst
##########
@@ -0,0 +1,76 @@
+.. Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+ ..   http://www.apache.org/licenses/LICENSE-2.0
+
+ .. Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+
+
+
+.. _howto/connection:snowflake:
+
+Snowflake Connection
+====================
+
+The Snowflake connection type enables integrations with Snowflake.
+
+Authenticating to Snowflake
+---------------------------
+
+Authenticate to Snowflake using the `Snowflake python connector default authentication
+<https://docs.snowflake.com/en/user-guide/python-connector-example.html#connecting-using-the-default-authenticator>`_.
+
+Default Connection IDs
+----------------------
+
+Hooks, operators, and sensors related to Snowflake use ``snowflake_default`` by default.
+
+Configuring the Connection
+--------------------------
+
+Login
+    Specify the snowflake username.
+
+Password
+    Specify the snowflake password.
+
+Host (optional)
+    Specify the snowflake hostname.
+
+Schema (optional)
+    Specify the snowflake schema to be used.
+
+Extra (optional)
+    Specify the extra parameters (as json dictionary) that can be used in the snowflake connection.
+    The following parameters are all optional:
+
+    * ``account``: Snowflake account name.
+    * ``database``: Snowflake database name.
+    * ``region``: Warehouse region.
+    * ``warehouse``: Snowflake warehouse name.
+    * ``role``: Snowflake role.
+    * ``authenticator``: To connect using OAuth set this parameter ``oath``
+    * ``private_key_file``: Specify the path to the private key file.
+    * ``session_parameters``: Specify `session level parameters
+      <https://docs.snowflake.com/en/user-guide/python-connector-example.html#setting-session-parameters>`_

Review comment:
       Is this section correct? This section suggest that you need to define these values in the Extra field while some of these values have dedicated field https://github.com/apache/airflow/pull/14724




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

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



[GitHub] [airflow] uranusjr commented on a change in pull request #15408: Add Connection Documentation to more Providers

Posted by GitBox <gi...@apache.org>.
uranusjr commented on a change in pull request #15408:
URL: https://github.com/apache/airflow/pull/15408#discussion_r616971342



##########
File path: airflow/providers/sftp/hooks/sftp.py
##########
@@ -45,9 +45,12 @@ class SFTPHook(SSHHook):
           permissions.
 
     Errors that may occur throughout but should be handled downstream.
+
+    :param sftp_conn_id: The :ref:`sftp connection id<howto/connection:sftp>`
+    :type sftp_conn_id: str
     """
 
-    conn_name_attr = 'ftp_conn_id'
+    conn_name_attr = 'sftp_conn_id'

Review comment:
       Wouldn’t think be backwards-incompatible? The change is the right thing to do, but may need a deprecation period?




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

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



[GitHub] [airflow] github-actions[bot] commented on pull request #15408: Add Connection Documentation to more Providers

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


   The PR is likely OK to be merged with just subset of tests for default Python and Database versions without running the full matrix of tests, because it does not modify the core of Airflow. If the committers decide that the full tests matrix is needed, they will add the label 'full tests needed'. Then you should rebase to the latest master or amend the last commit of the PR, and push it with --force-with-lease.


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

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



[GitHub] [airflow] sunkickr commented on pull request #15408: Add Connection Documentation to more Providers

Posted by GitBox <gi...@apache.org>.
sunkickr commented on pull request #15408:
URL: https://github.com/apache/airflow/pull/15408#issuecomment-826134766


   @potiuk I have reverted the incompatibly change and rebased to the latest master.


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

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



[GitHub] [airflow] github-actions[bot] commented on pull request #15408: Add Connection Documentation to more Providers

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


   The PR is likely OK to be merged with just subset of tests for default Python and Database versions without running the full matrix of tests, because it does not modify the core of Airflow. If the committers decide that the full tests matrix is needed, they will add the label 'full tests needed'. Then you should rebase to the latest master or amend the last commit of the PR, and push it with --force-with-lease.


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

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



[GitHub] [airflow] sunkickr commented on a change in pull request #15408: Add Connection Documentation to more Providers

Posted by GitBox <gi...@apache.org>.
sunkickr commented on a change in pull request #15408:
URL: https://github.com/apache/airflow/pull/15408#discussion_r615042397



##########
File path: docs/apache-airflow-providers-snowflake/connections/snowflake.rst
##########
@@ -0,0 +1,76 @@
+.. Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+ ..   http://www.apache.org/licenses/LICENSE-2.0
+
+ .. Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+
+
+
+.. _howto/connection:snowflake:
+
+Snowflake Connection
+====================
+
+The Snowflake connection type enables integrations with Snowflake.
+
+Authenticating to Snowflake
+---------------------------
+
+Authenticate to Snowflake using the `Snowflake python connector default authentication
+<https://docs.snowflake.com/en/user-guide/python-connector-example.html#connecting-using-the-default-authenticator>`_.
+
+Default Connection IDs
+----------------------
+
+Hooks, operators, and sensors related to Snowflake use ``snowflake_default`` by default.
+
+Configuring the Connection
+--------------------------
+
+Login
+    Specify the snowflake username.
+
+Password
+    Specify the snowflake password.
+
+Host (optional)
+    Specify the snowflake hostname.
+
+Schema (optional)
+    Specify the snowflake schema to be used.
+
+Extra (optional)
+    Specify the extra parameters (as json dictionary) that can be used in the snowflake connection.
+    The following parameters are all optional:
+
+    * ``account``: Snowflake account name.
+    * ``database``: Snowflake database name.
+    * ``region``: Warehouse region.
+    * ``warehouse``: Snowflake warehouse name.
+    * ``role``: Snowflake role.
+    * ``authenticator``: To connect using OAuth set this parameter ``oath``
+    * ``private_key_file``: Specify the path to the private key file.
+    * ``session_parameters``: Specify `session level parameters
+      <https://docs.snowflake.com/en/user-guide/python-connector-example.html#setting-session-parameters>`_

Review comment:
       yes, I'm not sure how to handle this since users that are using this documentation to build a URI would want to know that all these fields need to be specified as extras. I am assuming users using the Airflow UI would see that some of these have their own field and understand what's going on. Maybe it would be best to add a note about this somewhere in the documentation?




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

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



[GitHub] [airflow] sunkickr commented on a change in pull request #15408: Add Connection Documentation to more Providers

Posted by GitBox <gi...@apache.org>.
sunkickr commented on a change in pull request #15408:
URL: https://github.com/apache/airflow/pull/15408#discussion_r619691934



##########
File path: airflow/providers/sftp/hooks/sftp.py
##########
@@ -45,9 +45,12 @@ class SFTPHook(SSHHook):
           permissions.
 
     Errors that may occur throughout but should be handled downstream.
+
+    :param sftp_conn_id: The :ref:`sftp connection id<howto/connection:sftp>`
+    :type sftp_conn_id: str
     """
 
-    conn_name_attr = 'ftp_conn_id'
+    conn_name_attr = 'sftp_conn_id'

Review comment:
       @potiuk @uranusjr thanks for the review. I did not fully understand how this worked, I'll change it back!




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

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



[GitHub] [airflow] potiuk commented on a change in pull request #15408: Add Connection Documentation to more Providers

Posted by GitBox <gi...@apache.org>.
potiuk commented on a change in pull request #15408:
URL: https://github.com/apache/airflow/pull/15408#discussion_r619688934



##########
File path: airflow/providers/sftp/hooks/sftp.py
##########
@@ -45,9 +45,12 @@ class SFTPHook(SSHHook):
           permissions.
 
     Errors that may occur throughout but should be handled downstream.
+
+    :param sftp_conn_id: The :ref:`sftp connection id<howto/connection:sftp>`
+    :type sftp_conn_id: str
     """
 
-    conn_name_attr = 'ftp_conn_id'
+    conn_name_attr = 'sftp_conn_id'

Review comment:
       This change is wrong.
   
   It should remain ftp_conn_id because this is the name of the constructor argument (below:
   ```
       def __init__(self, ftp_conn_id: str = 'sftp_default', *args, **kwargs) -> None:
   ```
   
   It is later remapped to "ssh_conn_id" just before running the constructor of the parent class, so it does not matter. Note that it is just a name used when the connection is instantiated dynamically so it does not really matter what it is is, as long as it is consistent. And if someone ever created the Hook manually with keyword argument, changing it would mean backwards incompatibility as mentioned by @uranusjr 




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

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



[GitHub] [airflow] potiuk merged pull request #15408: Add Connection Documentation to more Providers

Posted by GitBox <gi...@apache.org>.
potiuk merged pull request #15408:
URL: https://github.com/apache/airflow/pull/15408


   


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

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



[GitHub] [airflow] potiuk commented on a change in pull request #15408: Add Connection Documentation to more Providers

Posted by GitBox <gi...@apache.org>.
potiuk commented on a change in pull request #15408:
URL: https://github.com/apache/airflow/pull/15408#discussion_r619689466



##########
File path: docs/apache-airflow-providers-snowflake/connections/snowflake.rst
##########
@@ -0,0 +1,76 @@
+.. Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+ ..   http://www.apache.org/licenses/LICENSE-2.0
+
+ .. Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+
+
+
+.. _howto/connection:snowflake:
+
+Snowflake Connection
+====================
+
+The Snowflake connection type enables integrations with Snowflake.
+
+Authenticating to Snowflake
+---------------------------
+
+Authenticate to Snowflake using the `Snowflake python connector default authentication
+<https://docs.snowflake.com/en/user-guide/python-connector-example.html#connecting-using-the-default-authenticator>`_.
+
+Default Connection IDs
+----------------------
+
+Hooks, operators, and sensors related to Snowflake use ``snowflake_default`` by default.
+
+Configuring the Connection
+--------------------------
+
+Login
+    Specify the snowflake username.
+
+Password
+    Specify the snowflake password.
+
+Host (optional)
+    Specify the snowflake hostname.
+
+Schema (optional)
+    Specify the snowflake schema to be used.
+
+Extra (optional)
+    Specify the extra parameters (as json dictionary) that can be used in the snowflake connection.
+    The following parameters are all optional:
+
+    * ``account``: Snowflake account name.
+    * ``database``: Snowflake database name.
+    * ``region``: Warehouse region.
+    * ``warehouse``: Snowflake warehouse name.
+    * ``role``: Snowflake role.
+    * ``authenticator``: To connect using OAuth set this parameter ``oath``
+    * ``private_key_file``: Specify the path to the private key file.
+    * ``session_parameters``: Specify `session level parameters
+      <https://docs.snowflake.com/en/user-guide/python-connector-example.html#setting-session-parameters>`_

Review comment:
       Agree with @sunkickr. This documentation is mostly for those who want to define the connnections manually rather than via UI. When you configure the connection via UI you have dedicated fields, but when you create it manually via cli or env variable, those need to be extras (the UI remaps values to extras). I think it's best to leave it as it is - users of Airlfow know how it works, and even if not, the UI fields for those "custom" connections have enough description/are clear enough. And in case you have those custom fields, extra is not even visible in the UI, so it is pretty clear what's going on I think.




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

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



[GitHub] [airflow] potiuk commented on pull request #15408: Add Connection Documentation to more Providers

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


   @eladkal care for re-review? 


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

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



[GitHub] [airflow] potiuk merged pull request #15408: Add Connection Documentation to more Providers

Posted by GitBox <gi...@apache.org>.
potiuk merged pull request #15408:
URL: https://github.com/apache/airflow/pull/15408


   


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

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



[GitHub] [airflow] eladkal commented on a change in pull request #15408: Add Connection Documentation to more Providers

Posted by GitBox <gi...@apache.org>.
eladkal commented on a change in pull request #15408:
URL: https://github.com/apache/airflow/pull/15408#discussion_r615024146



##########
File path: docs/apache-airflow-providers-snowflake/connections/snowflake.rst
##########
@@ -0,0 +1,76 @@
+.. Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+ ..   http://www.apache.org/licenses/LICENSE-2.0
+
+ .. Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+
+
+
+.. _howto/connection:snowflake:
+
+Snowflake Connection
+====================
+
+The Snowflake connection type enables integrations with Snowflake.
+
+Authenticating to Snowflake
+---------------------------
+
+Authenticate to Snowflake using the `Snowflake python connector default authentication
+<https://docs.snowflake.com/en/user-guide/python-connector-example.html#connecting-using-the-default-authenticator>`_.
+
+Default Connection IDs
+----------------------
+
+Hooks, operators, and sensors related to Snowflake use ``snowflake_default`` by default.
+
+Configuring the Connection
+--------------------------
+
+Login
+    Specify the snowflake username.
+
+Password
+    Specify the snowflake password.
+
+Host (optional)
+    Specify the snowflake hostname.
+
+Schema (optional)
+    Specify the snowflake schema to be used.
+
+Extra (optional)
+    Specify the extra parameters (as json dictionary) that can be used in the snowflake connection.
+    The following parameters are all optional:
+
+    * ``account``: Snowflake account name.
+    * ``database``: Snowflake database name.
+    * ``region``: Warehouse region.
+    * ``warehouse``: Snowflake warehouse name.
+    * ``role``: Snowflake role.
+    * ``authenticator``: To connect using OAuth set this parameter ``oath``
+    * ``private_key_file``: Specify the path to the private key file.
+    * ``session_parameters``: Specify `session level parameters
+      <https://docs.snowflake.com/en/user-guide/python-connector-example.html#setting-session-parameters>`_

Review comment:
       Is this section correct? See https://github.com/apache/airflow/pull/14724




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

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