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 2018/12/05 20:35:31 UTC

[GitHub] kaxil closed pull request #4273: [AIRFLOW-XXX] GCP operators documentation clarifications

kaxil closed pull request #4273: [AIRFLOW-XXX] GCP operators documentation clarifications
URL: https://github.com/apache/incubator-airflow/pull/4273
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/airflow/contrib/hooks/gcp_sql_hook.py b/airflow/contrib/hooks/gcp_sql_hook.py
index 43e664d15c..3797680cbc 100644
--- a/airflow/contrib/hooks/gcp_sql_hook.py
+++ b/airflow/contrib/hooks/gcp_sql_hook.py
@@ -110,7 +110,7 @@ def create_instance(self, project_id, body):
         :param body: Body required by the Cloud SQL insert API, as described in
             https://cloud.google.com/sql/docs/mysql/admin-api/v1beta4/instances/insert#request-body.
         :type body: dict
-        :return: True if the operation succeeded, raises an error otherwise.
+        :return: True if the operation succeeded otherwise raises an error.
         :rtype: bool
         """
         response = self.get_conn().instances().insert(
@@ -134,7 +134,7 @@ def patch_instance(self, project_id, body, instance):
         :type body: dict
         :param instance: Cloud SQL instance ID. This does not include the project ID.
         :type instance: str
-        :return: True if the operation succeeded, raises an error otherwise.
+        :return: True if the operation succeeded otherwise raises an error.
         :rtype: bool
         """
         response = self.get_conn().instances().patch(
@@ -153,7 +153,7 @@ def delete_instance(self, project_id, instance):
         :type project_id: str
         :param instance: Cloud SQL instance ID. This does not include the project ID.
         :type instance: str
-        :return: True if the operation succeeded, raises an error otherwise
+        :return: True if the operation succeeded otherwise raises an error.
         :rtype: bool
         """
         response = self.get_conn().instances().delete(
@@ -194,7 +194,7 @@ def create_database(self, project, instance, body):
         :param body: The request body, as described in
             https://cloud.google.com/sql/docs/mysql/admin-api/v1beta4/databases/insert#request-body.
         :type body: dict
-        :return: True if the operation succeeded, raises an error otherwise.
+        :return: True if the operation succeeded otherwise raises an error.
         :rtype: bool
         """
         response = self.get_conn().databases().insert(
@@ -210,7 +210,7 @@ def patch_database(self, project, instance, database, body):
         Updates a database resource inside a Cloud SQL instance.
 
         This method supports patch semantics.
-        See: https://cloud.google.com/sql/docs/mysql/admin-api/how-tos/performance#patch
+        See https://cloud.google.com/sql/docs/mysql/admin-api/how-tos/performance#patch.
 
         :param project: Project ID of the project that contains the instance.
         :type project: str
@@ -221,7 +221,7 @@ def patch_database(self, project, instance, database, body):
         :param body: The request body, as described in
             https://cloud.google.com/sql/docs/mysql/admin-api/v1beta4/databases/insert#request-body.
         :type body: dict
-        :return: True if the operation succeeded, raises an error otherwise.
+        :return: True if the operation succeeded otherwise raises an error.
         :rtype: bool
         """
         response = self.get_conn().databases().patch(
@@ -243,7 +243,7 @@ def delete_database(self, project, instance, database):
         :type instance: str
         :param database: Name of the database to be deleted in the instance.
         :type database: str
-        :return: True if the operation succeeded, raises an error otherwise.
+        :return: True if the operation succeeded otherwise raises an error.
         :rtype: bool
         """
         response = self.get_conn().databases().delete(
@@ -293,11 +293,11 @@ def _wait_for_operation_to_complete(self, project_id, operation_name):
 
 class CloudSqlProxyRunner(LoggingMixin):
     """
-    Downloads and runs cloud-sql-proxy as subprocess of the python process.
+    Downloads and runs cloud-sql-proxy as subprocess of the Python process.
 
     The cloud-sql-proxy needs to be downloaded and started before we can connect
     to the Google Cloud SQL instance via database connection. It establishes
-    secure tunnel connection to the database - it authorizes using the
+    secure tunnel connection to the database. It authorizes using the
     GCP credentials that are passed by the configuration.
 
     More details about the proxy can be found here:
@@ -438,7 +438,7 @@ def _get_credential_parameters(self, session):
 
     def start_proxy(self):
         """
-        Starts Cloud Sql Proxy.
+        Starts Cloud SQL Proxy.
 
         You have to remember to stop the proxy if you started it!
         """
@@ -516,7 +516,7 @@ def stop_proxy(self):
 
     def get_proxy_version(self):
         """
-        Returns version of the Cloud Sql Proxy.
+        Returns version of the Cloud SQL Proxy.
         """
         self._download_sql_proxy_if_needed()
         command_to_run = [self.sql_proxy_path]
@@ -532,7 +532,7 @@ def get_proxy_version(self):
 
     def get_socket_path(self):
         """
-        Retrieves UNIX socket path used by Cloud Sql Proxy.
+        Retrieves UNIX socket path used by Cloud SQL Proxy.
 
         :return: The dynamically generated path for the socket created by the proxy.
         :rtype: str
@@ -583,38 +583,38 @@ def get_socket_path(self):
 # noinspection PyAbstractClass
 class CloudSqlDatabaseHook(BaseHook):
     """
-    Serves DB connection configuration for CloudSQL (Connections
+    Serves DB connection configuration for Google Cloud SQL (Connections
     of *gcpcloudsql://* type).
 
-    The hook is a "meta" one - it does not perform an actual connection,
-    it is there to retrieve all the parameters configured in gcpcloudsql:// connection,
-    start/stop Cloud Sql Proxy if needed, dynamically generate Postgres or MySQL
+    The hook is a "meta" one. It does not perform an actual connection.
+    It is there to retrieve all the parameters configured in gcpcloudsql:// connection,
+    start/stop Cloud SQL Proxy if needed, dynamically generate Postgres or MySQL
     connection in the database and return an actual Postgres or MySQL hook.
-    The returned Postgres/MySQL hooks are using direct connection or Cloud Sql
-    Proxy socket/tcp as configured.
+    The returned Postgres/MySQL hooks are using direct connection or Cloud SQL
+    Proxy socket/TCP as configured.
 
     Main parameters of the hook are retrieved from the standard URI components:
 
     * **user** - User name to authenticate to the database (from login of the URI).
-    * **password** - Password to authenticate to the database (from password of the URI)
-    * **public_ip** - IP to connect to for public connection (from host of the URI)
-    * **public_port** - Port to connect to for public connection (from port of the URI)
-    * **database** - Database to connect to (from schema of the URI)
+    * **password** - Password to authenticate to the database (from password of the URI).
+    * **public_ip** - IP to connect to for public connection (from host of the URI).
+    * **public_port** - Port to connect to for public connection (from port of the URI).
+    * **database** - Database to connect to (from schema of the URI).
 
     Remaining parameters are retrieved from the extras (URI query parameters):
 
     * **project_id** - Google Cloud Platform project where the Cloud SQL instance exists.
     * **instance** -  Name of the instance of the Cloud SQL database instance.
-    * **location** - The location of the cloud sql instance (for example europe-west1).
-    * **database_type** - The type of the database instance (mysql or postgres).
+    * **location** - The location of the Cloud SQL instance (for example europe-west1).
+    * **database_type** - The type of the database instance (MySQL or Postgres).
     * **use_proxy** - (default False) Whether SQL proxy should be used to connect to Cloud
       SQL DB.
     * **use_ssl** - (default False) Whether SSL should be used to connect to Cloud SQL DB.
-      You cannot use proxy and ssl together.
+      You cannot use proxy and SSL together.
     * **sql_proxy_use_tcp** - (default False) If set to true, TCP is used to connect via
       proxy, otherwise UNIX sockets are used.
-    * **sql_proxy_binary_path** - Optional path to sql proxy binary. If the binary is not
-      specified or the binary is not present, it is automatically downloaded.
+    * **sql_proxy_binary_path** - Optional path to Cloud SQL Proxy binary. If the binary
+      is not specified or the binary is not present, it is automatically downloaded.
     * **sql_proxy_version** -  Specific version of the proxy to download (for example
       v1.13). If not specified, the latest version is downloaded.
     * **sslcert** - Path to client certificate to authenticate when SSL is used.
@@ -683,8 +683,8 @@ def _validate_inputs(self):
                 self.database_type, CLOUD_SQL_VALID_DATABASE_TYPES
             ))
         if self.use_proxy and self.use_ssl:
-            raise AirflowException("Cloud Sql Proxy does not support SSL connections."
-                                   " SSL is not needed as Cloud Sql Proxy "
+            raise AirflowException("Cloud SQL Proxy does not support SSL connections."
+                                   " SSL is not needed as Cloud SQL Proxy "
                                    "provides encryption on its own")
         if self.use_ssl:
             self._check_ssl_file(self.sslcert, "sslcert")
@@ -770,7 +770,7 @@ def _get_sqlproxy_instance_specification(self):
     @provide_session
     def create_connection(self, session=None):
         """
-        Create connection in the Connection table - according to whether it uses
+        Create connection in the Connection table, according to whether it uses
         proxy, TCP, UNIX sockets, SSL. Connection ID will be randomly generated.
 
         :param session: Session of the SQL Alchemy ORM (automatically generated with
@@ -799,10 +799,10 @@ def delete_connection(self, session=None):
 
     def get_sqlproxy_runner(self):
         """
-        Retrieve Cloud Sql Proxy runner. It is used to manage the proxy
+        Retrieve Cloud SQL Proxy runner. It is used to manage the proxy
         lifecycle per task.
 
-        :return: The Cloud Sql Proxy runner.
+        :return: The Cloud SQL Proxy runner.
         :rtype: CloudSqlProxyRunner
         """
         return CloudSqlProxyRunner(
@@ -815,8 +815,8 @@ def get_sqlproxy_runner(self):
 
     def get_database_hook(self):
         """
-        Retrieve database hook - this is the actual Postgres or MySQL database hook
-        that uses proxy or connects directly to the Google Cloud Sql database.
+        Retrieve database hook. This is the actual Postgres or MySQL database hook
+        that uses proxy or connects directly to the Google Cloud SQL database.
         """
         if self.database_type == 'postgres':
             self.db_hook = PostgresHook(postgres_conn_id=self.db_conn_id,
@@ -836,7 +836,7 @@ def cleanup_database_hook(self):
 
     def reserve_free_tcp_port(self):
         """
-        Reserve free TCP port to be used by Cloud Sql Proxy
+        Reserve free TCP port to be used by Cloud SQL Proxy
         """
         self.reserved_tcp_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
         self.reserved_tcp_socket.bind(('127.0.0.1', 0))
@@ -844,7 +844,7 @@ def reserve_free_tcp_port(self):
 
     def free_reserved_port(self):
         """
-        Free TCP port - makes it immediately ready to be used by Cloud Sql Proxy.
+        Free TCP port. Makes it immediately ready to be used by Cloud SQL Proxy.
         """
         if self.reserved_tcp_socket:
             self.reserved_tcp_socket.close()
diff --git a/docs/howto/manage-connections.rst b/docs/howto/manage-connections.rst
index 35b5807c9e..f38ff2fb61 100644
--- a/docs/howto/manage-connections.rst
+++ b/docs/howto/manage-connections.rst
@@ -16,7 +16,7 @@
     under the License.
 
 Managing Connections
-=====================
+====================
 
 Airflow needs to know how to connect to your environment. Information
 such as hostname, port, login and passwords to other systems and services is
@@ -170,21 +170,21 @@ Password (required)
     Specify the password to connect.    
     
 Extra (optional)
-    Specify the extra parameters (as json dictionary) that can be used in mysql
+    Specify the extra parameters (as json dictionary) that can be used in MySQL
     connection. The following parameters are supported:
 
     * **charset**: specify charset of the connection
-    * **cursor**: one of "sscursor", "dictcursor, "ssdictcursor" - specifies cursor class to be
+    * **cursor**: one of "sscursor", "dictcursor, "ssdictcursor" . Specifies cursor class to be
       used
     * **local_infile**: controls MySQL's LOCAL capability (permitting local data loading by
       clients). See `MySQLdb docs <https://mysqlclient.readthedocs.io/user_guide.html>`_
       for details.
-    * **unix_socket**: UNIX socket used instead of the default socket
-    * **ssl**: Dictionary of SSL parameters that control connecting using SSL (those
+    * **unix_socket**: UNIX socket used instead of the default socket.
+    * **ssl**: Dictionary of SSL parameters that control connecting using SSL. Those
       parameters are server specific and should contain "ca", "cert", "key", "capath",
       "cipher" parameters. See
       `MySQLdb docs <https://mysqlclient.readthedocs.io/user_guide.html>`_ for details.
-      Note that in order to be useful in URL notation, this parameter might also be
+      Note that to be useful in URL notation, this parameter might also be
       a string where the SSL dictionary is a string-encoded JSON dictionary.
 
     Example "extras" field:
@@ -216,8 +216,8 @@ Extra (optional)
        }
 
     When specifying the connection as URI (in AIRFLOW_CONN_* variable) you should specify it
-    following the standard syntax of DB connections, where extras are passed as parameters
-    of the URI (note that all components of the URI should be URL-encoded).
+    following the standard syntax of DB connections - where extras are passed as parameters
+    of the URI. Note that all components of the URI should be URL-encoded.
 
     For example:
 
@@ -226,7 +226,7 @@ Extra (optional)
        mysql://mysql_user:XXXXXXXXXXXX@1.1.1.1:3306/mysqldb?ssl=%7B%22cert%22%3A+%22%2Ftmp%2Fclient-cert.pem%22%2C+%22ca%22%3A+%22%2Ftmp%2Fserver-ca.pem%22%2C+%22key%22%3A+%22%2Ftmp%2Fclient-key.pem%22%7D
 
     .. note::
-        If encounter UnicodeDecodeError while working with MySQL connection check
+        If encounter UnicodeDecodeError while working with MySQL connection, check
         the charset defined is matched to the database charset.
 
 Postgres
@@ -269,7 +269,7 @@ Extra (optional)
       should send a keepalive message to the server.
 
     More details on all Postgres parameters supported can be found in
-    `Postgres documentation <https://www.postgresql.org/docs/current/static/libpq-connect.html#LIBPQ-CONNSTRING>`_
+    `Postgres documentation <https://www.postgresql.org/docs/current/static/libpq-connect.html#LIBPQ-CONNSTRING>`_.
 
     Example "extras" field:
 
@@ -297,14 +297,14 @@ Cloudsql
 The gcpcloudsql:// connection is used by
 :class:`airflow.contrib.operators.gcp_sql_operator.CloudSqlQueryOperator` to perform query
 on a Google Cloud SQL database. Google Cloud SQL database can be either
-Postgres or MySQL, so this is a "meta" connection type - it introduces common schema
+Postgres or MySQL, so this is a "meta" connection type. It introduces common schema
 for both MySQL and Postgres, including what kind of connectivity should be used.
-Google Cloud SQL supports connecting via public IP or via Cloud Sql Proxy
-and in the latter case the
+Google Cloud SQL supports connecting via public IP or via Cloud SQL Proxy.
+In the latter case the
 :class:`~airflow.contrib.hooks.gcp_sql_hook.CloudSqlDatabaseHook` uses
 :class:`~airflow.contrib.hooks.gcp_sql_hook.CloudSqlProxyRunner` to automatically prepare
 and use temporary Postgres or MySQL connection that will use the proxy to connect
-(either via TCP or UNIX socket)
+(either via TCP or UNIX socket.
 
 Configuring the Connection
 ''''''''''''''''''''''''''
@@ -321,7 +321,7 @@ Password (required)
     Specify the password to connect.
 
 Extra (optional)
-    Specify the extra parameters (as json dictionary) that can be used in gcpcloudsql
+    Specify the extra parameters (as JSON dictionary) that can be used in Google Cloud SQL
     connection.
 
     Details of all the parameters supported in extra field can be found in
@@ -340,9 +340,9 @@ Extra (optional)
           "sql_proxy_use_tcp": false
        }
 
-    When specifying the connection as URI (in AIRFLOW_CONN_* variable) you should specify it
-    following the standard syntax of DB connections, where extras are passed as parameters
-    of the URI (note that all components of the URI should be URL-encoded).
+    When specifying the connection as URI (in AIRFLOW_CONN_* variable), you should specify
+    it following the standard syntax of DB connection, where extras are passed as
+    parameters of the URI. Note that all components of the URI should be URL-encoded.
 
     For example:
 
diff --git a/docs/howto/operator.rst b/docs/howto/operator.rst
index dc0f4c99d3..62fd4a0398 100644
--- a/docs/howto/operator.rst
+++ b/docs/howto/operator.rst
@@ -162,7 +162,8 @@ Templating
 More information
 """"""""""""""""
 
-See `Google Compute Engine API documentation <https://cloud.google.com/compute/docs/reference/rest/v1/instances/start>`_
+See `Google Compute Engine API documentation
+<https://cloud.google.com/compute/docs/reference/rest/v1/instances/start>`_.
 
 
 GceInstanceStopOperator
@@ -170,7 +171,7 @@ GceInstanceStopOperator
 
 Use the operator to stop Google Compute Engine instance.
 
-For parameter definition take a look at
+For parameter definition, take a look at
 :class:`~airflow.contrib.operators.gcp_compute_operator.GceInstanceStopOperator`
 
 Arguments
@@ -204,7 +205,8 @@ Templating
 More information
 """"""""""""""""
 
-See `Google Compute Engine API documentation <https://cloud.google.com/compute/docs/reference/rest/v1/instances/stop>`_
+See `Google Compute Engine API documentation
+<https://cloud.google.com/compute/docs/reference/rest/v1/instances/stop>`_.
 
 
 GceSetMachineTypeOperator
@@ -212,8 +214,8 @@ GceSetMachineTypeOperator
 
 Use the operator to change machine type of a Google Compute Engine instance.
 
-For parameter definition take a look at
-:class:`~airflow.contrib.operators.gcp_compute_operator.GceSetMachineTypeOperator`
+For parameter definition, take a look at
+:class:`~airflow.contrib.operators.gcp_compute_operator.GceSetMachineTypeOperator`.
 
 Arguments
 """""""""
@@ -252,7 +254,8 @@ Templating
 More information
 """"""""""""""""
 
-See `Google Compute Engine API documentation <https://cloud.google.com/compute/docs/reference/rest/v1/instances/setMachineType>`_
+See `Google Compute Engine API documentation
+<https://cloud.google.com/compute/docs/reference/rest/v1/instances/setMachineType>`_.
 
 
 GceInstanceTemplateCopyOperator
@@ -261,7 +264,7 @@ GceInstanceTemplateCopyOperator
 Use the operator to copy an existing Google Compute Engine instance template
 applying a patch to it.
 
-For parameter definition take a look at
+For parameter definition, take a look at
 :class:`~airflow.contrib.operators.gcp_compute_operator.GceInstanceTemplateCopyOperator`.
 
 Arguments
@@ -300,14 +303,15 @@ Templating
 More information
 """"""""""""""""
 
-See `Google Compute Engine API documentation <https://cloud.google.com/compute/docs/reference/rest/v1/instanceTemplates>`_
+See `Google Compute Engine API documentation
+<https://cloud.google.com/compute/docs/reference/rest/v1/instanceTemplates>`_.
 
 GceInstanceGroupManagerUpdateTemplateOperator
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 Use the operator to update template in Google Compute Engine Instance Group Manager.
 
-For parameter definition take a look at
+For parameter definition, take a look at
 :class:`~airflow.contrib.operators.gcp_compute_operator.GceInstanceGroupManagerUpdateTemplateOperator`.
 
 Arguments
@@ -347,13 +351,15 @@ Troubleshooting
 """""""""""""""
 
 You might find that your GceInstanceGroupManagerUpdateTemplateOperator fails with
-missing permissions. The service account has to have Service Account User role assigned
-via IAM permissions in order to execute the operation.
+missing permissions. To execute the operation, the service account requires
+the permissions that theService Account User role provides
+(assigned via Google Cloud IAM).
 
 More information
 """"""""""""""""
 
-See `Google Compute Engine API documentation <https://cloud.google.com/compute/docs/reference/rest/v1/instanceGroupManagers>`_
+See `Google Compute Engine API documentation
+<https://cloud.google.com/compute/docs/reference/rest/v1/instanceGroupManagers>`_.
 
 Google Cloud Functions Operators
 --------------------------------
@@ -363,7 +369,7 @@ GcfFunctionDeleteOperator
 
 Use the operator to delete a function from Google Cloud Functions.
 
-For parameter definition take a look at
+For parameter definition, take a look at
 :class:`~airflow.contrib.operators.gcp_function_operator.GcfFunctionDeleteOperator`.
 
 Arguments
@@ -417,19 +423,21 @@ and SERVICE_ACCOUNT_EMAIL with the email ID of your service account.
     --role="roles/iam.serviceAccountUser"
 
 
-See `Adding the IAM service agent user role to the runtime service <https://cloud.google.com/functions/docs/reference/iam/roles#adding_the_iam_service_agent_user_role_to_the_runtime_service_account>`_  for details
+See `Adding the IAM service agent user role to the runtime service
+<https://cloud.google.com/functions/docs/reference/iam/roles#adding_the_iam_service_agent_user_role_to_the_runtime_service_account>`_.
 
 More information
 """"""""""""""""
 
-See `Google Cloud Functions API documentation <https://cloud.google.com/functions/docs/reference/rest/v1/projects.locations.functions/delete>`_
+See `Google Cloud Functions API documentation
+<https://cloud.google.com/functions/docs/reference/rest/v1/projects.locations.functions/delete>`_.
 
 GcfFunctionDeployOperator
 ^^^^^^^^^^^^^^^^^^^^^^^^^
 
 Use the operator to deploy a function to Google Cloud Functions.
 
-For parameter definition take a look at
+For parameter definition, take a look at
 :class:`~airflow.contrib.operators.gcp_function_operator.GcfFunctionDeployOperator`.
 
 
@@ -463,7 +471,8 @@ Note that the neither the body nor the default args are complete in the above ex
 Depending on the variables set, there might be different variants on how to pass source
 code related fields. Currently, you can pass either sourceArchiveUrl, sourceRepository
 or sourceUploadUrl as described in the
-`Cloud Functions API specification <https://cloud.google.com/functions/docs/reference/rest/v1/projects.locations.functions#CloudFunction>`_.
+`Cloud Functions API specification
+<https://cloud.google.com/functions/docs/reference/rest/v1/projects.locations.functions#CloudFunction>`_.
 
 Additionally, default_args or direct operator args might contain zip_path parameter
 to run the extra step of uploading the source code before deploying it.
@@ -530,7 +539,8 @@ can be downloaded if necessary.
 More information
 """"""""""""""""
 
-See `Google Cloud Functions API documentation <https://cloud.google.com/functions/docs/reference/rest/v1/projects.locations.functions/create>`_
+See `Google Cloud Functions API documentation
+<https://cloud.google.com/functions/docs/reference/rest/v1/projects.locations.functions/create>`_.
 
 Google Cloud Sql Operators
 --------------------------
@@ -540,7 +550,7 @@ CloudSqlInstanceDatabaseCreateOperator
 
 Creates a new database inside a Cloud SQL instance.
 
-For parameter definition take a look at
+For parameter definition, take a look at
 :class:`~airflow.contrib.operators.gcp_sql_operator.CloudSqlInstanceDatabaseCreateOperator`.
 
 Arguments
@@ -589,7 +599,7 @@ CloudSqlInstanceDatabaseDeleteOperator
 
 Deletes a database from a Cloud SQL instance.
 
-For parameter definition take a look at
+For parameter definition, take a look at
 :class:`~airflow.contrib.operators.gcp_sql_operator.CloudSqlInstanceDatabaseDeleteOperator`.
 
 Arguments
@@ -633,7 +643,7 @@ Updates a resource containing information about a database inside a Cloud SQL in
 using patch semantics.
 See: https://cloud.google.com/sql/docs/mysql/admin-api/how-tos/performance#patch
 
-For parameter definition take a look at
+For parameter definition, take a look at
 :class:`~airflow.contrib.operators.gcp_sql_operator.CloudSqlInstanceDatabasePatchOperator`.
 
 Arguments
@@ -682,7 +692,7 @@ CloudSqlInstanceDeleteOperator
 
 Deletes a Cloud SQL instance in Google Cloud Platform.
 
-For parameter definition take a look at
+For parameter definition, take a look at
 :class:`~airflow.contrib.operators.gcp_sql_operator.CloudSqlInstanceDeleteOperator`.
 
 Arguments
@@ -726,7 +736,7 @@ CloudSqlInstanceCreateOperator
 
 Creates a new Cloud SQL instance in Google Cloud Platform.
 
-For parameter definition take a look at
+For parameter definition, take a look at
 :class:`~airflow.contrib.operators.gcp_sql_operator.CloudSqlInstanceCreateOperator`.
 
 If an instance with the same name exists, no action will be taken and the operator
@@ -770,8 +780,8 @@ Templating
 More information
 """"""""""""""""
 
-See `Google Cloud SQL API documentation for insert <https://cloud.google
-.com/sql/docs/mysql/admin-api/v1beta4/instances/insert>`_.
+See `Google Cloud SQL API documentation for insert
+<https://cloud.google.com/sql/docs/mysql/admin-api/v1beta4/instances/insert>`_.
 
 
 .. _CloudSqlInstancePatchOperator:
@@ -781,7 +791,7 @@ CloudSqlInstancePatchOperator
 
 Updates settings of a Cloud SQL instance in Google Cloud Platform (partial update).
 
-For parameter definition take a look at
+For parameter definition, take a look at
 :class:`~airflow.contrib.operators.gcp_sql_operator.CloudSqlInstancePatchOperator`.
 
 This is a partial update, so only values for the settings specified in the body
@@ -826,44 +836,44 @@ Templating
 More information
 """"""""""""""""
 
-See `Google Cloud SQL API documentation for patch <https://cloud.google
-.com/sql/docs/mysql/admin-api/v1beta4/instances/patch>`_.
+See `Google Cloud SQL API documentation for patch
+<https://cloud.google.com/sql/docs/mysql/admin-api/v1beta4/instances/patch>`_.
 
 
 CloudSqlQueryOperator
 ^^^^^^^^^^^^^^^^^^^^^
 
 Performs DDL or DML SQL queries in Google Cloud SQL instance. The DQL
-(retrieving data from Google Cloud SQL) is not supported - you might run the SELECT
-queries but results of those queries are discarded.
+(retrieving data from Google Cloud SQL) is not supported. You might run the SELECT
+queries, but the results of those queries are discarded.
 
-You can specify various connectivity methods to connect to running instance -
+You can specify various connectivity methods to connect to running instance,
 starting from public IP plain connection through public IP with SSL or both TCP and
-socket connection via Cloud Sql Proxy. The proxy is downloaded and started/stopped
+socket connection via Cloud SQL Proxy. The proxy is downloaded and started/stopped
 dynamically as needed by the operator.
 
 There is a *gcpcloudsql://* connection type that you should use to define what
 kind of connectivity you want the operator to use. The connection is a "meta"
 type of connection. It is not used to make an actual connectivity on its own, but it
-determines whether Cloud Sql Proxy should be started by `CloudSqlDatabaseHook`
-and what kind of the database connection (Postgres or MySQL) should be created
-dynamically - to either connect to Cloud SQL via public IP address or via the proxy.
+determines whether Cloud SQL Proxy should be started by `CloudSqlDatabaseHook`
+and what kind of database connection (Postgres or MySQL) should be created
+dynamically to connect to Cloud SQL via public IP address or via the proxy.
 The 'CloudSqlDatabaseHook` uses
-:class:`~airflow.contrib.hooks.gcp_sql_hook.CloudSqlProxyRunner` to manage Cloud Sql
-Proxy lifecycle (each task has its own Cloud Sql Proxy)
+:class:`~airflow.contrib.hooks.gcp_sql_hook.CloudSqlProxyRunner` to manage Cloud SQL
+Proxy lifecycle (each task has its own Cloud SQL Proxy)
 
 When you build connection, you should use connection parameters as described in
 :class:`~airflow.contrib.hooks.gcp_sql_hook.CloudSqlDatabaseHook`. You can see
 examples of connections below for all the possible types of connectivity. Such connection
-can be reused between different tasks (instances of `CloudSqlQueryOperator`) - each
+can be reused between different tasks (instances of `CloudSqlQueryOperator`). Each
 task will get their own proxy started if needed with their own TCP or UNIX socket.
 
-For parameter definition take a look at
+For parameter definition, take a look at
 :class:`~airflow.contrib.operators.gcp_sql_operator.CloudSqlQueryOperator`.
 
-Since query operator can run arbitrary query - it cannot be guaranteed to be
-idempotent. SQL query designer should design the queries to be idempotent. For example
-both Postgres and MySql support CREATE TABLE IF NOT EXISTS statements that can be
+Since query operator can run arbitrary query, it cannot be guaranteed to be
+idempotent. SQL query designer should design the queries to be idempotent. For example,
+both Postgres and MySQL support CREATE TABLE IF NOT EXISTS statements that can be
 used to create tables in an idempotent way.
 
 Arguments
@@ -896,8 +906,8 @@ of the connection URI should be URL-encoded:
 Using the operator
 """"""""""""""""""
 
-Example operators below are using all connectivity options (note connection id
-from the operator matches the `AIRFLOW_CONN_*` postfix uppercase - this is
+Example operators below are using all connectivity options. Note connection id
+from the operator matches the `AIRFLOW_CONN_*` postfix uppercase. This is
 standard AIRFLOW notation for defining connection via environment variables):
 
 .. literalinclude:: ../../airflow/contrib/example_dags/example_gcp_sql_query.py
@@ -917,9 +927,8 @@ Templating
 More information
 """"""""""""""""
 
-See `Google Cloud Sql Proxy documentation
-<https://cloud.google.com/sql/docs/postgres/sql-proxy>`_
-for details about Cloud Sql Proxy.
+See `Google Cloud SQL Proxy documentation
+<https://cloud.google.com/sql/docs/postgres/sql-proxy>`_.
 
 Google Cloud Storage Operators
 ------------------------------
@@ -929,7 +938,7 @@ GoogleCloudStorageBucketCreateAclEntryOperator
 
 Creates a new ACL entry on the specified bucket.
 
-For parameter definition take a look at
+For parameter definition, take a look at
 :class:`~airflow.contrib.operators.gcs_acl_operator.GoogleCloudStorageBucketCreateAclEntryOperator`
 
 Arguments
@@ -964,15 +973,14 @@ More information
 """"""""""""""""
 
 See `Google Cloud Storage BucketAccessControls insert documentation
-<https://cloud.google.com/storage/docs/json_api/v1/bucketAccessControls/insert>`_
-for details.
+<https://cloud.google.com/storage/docs/json_api/v1/bucketAccessControls/insert>`_.
 
 GoogleCloudStorageObjectCreateAclEntryOperator
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 Creates a new ACL entry on the specified object.
 
-For parameter definition take a look at
+For parameter definition, take a look at
 :class:`~airflow.contrib.operators.gcs_acl_operator.GoogleCloudStorageObjectCreateAclEntryOperator`
 
 Arguments
@@ -1007,6 +1015,5 @@ More information
 """"""""""""""""
 
 See `Google Cloud Storage ObjectAccessControls insert documentation
-<https://cloud.google.com/storage/docs/json_api/v1/objectAccessControls/insert>`_
-for details.
+<https://cloud.google.com/storage/docs/json_api/v1/objectAccessControls/insert>`_.
 
diff --git a/docs/integration.rst b/docs/integration.rst
index 7387fc25f4..eb8df37267 100644
--- a/docs/integration.rst
+++ b/docs/integration.rst
@@ -641,11 +641,11 @@ Compute Engine Operators
 - :ref:`GceInstanceGroupManagerUpdateTemplateOperator` : patch the Instance Group Manager,
   replacing source Instance Template URL with the destination one.
 
-The operators have common base operator:
+The operators have the common base operator:
 
 .. autoclass:: airflow.contrib.operators.gcp_compute_operator.GceBaseOperator
 
-They also use :ref:`GceHook` hook to communicate with Google Cloud Platform.
+They also use :ref:`GceHook` to communicate with Google Cloud Platform.
 
 .. _GceInstanceStartOperator:
 
@@ -702,7 +702,7 @@ Cloud Functions Operators
 
 .. autoclass:: airflow.contrib.operators.gcp_operator.GCP
 
-They also use :ref:`GcfHook` hook to communicate with Google Cloud Platform.
+They also use :ref:`GcfHook` to communicate with Google Cloud Platform.
 
 .. _GcfFunctionDeployOperator:
 
diff --git a/tests/contrib/operators/test_gcp_sql_operator.py b/tests/contrib/operators/test_gcp_sql_operator.py
index 516fcef4aa..7c75da19a2 100644
--- a/tests/contrib/operators/test_gcp_sql_operator.py
+++ b/tests/contrib/operators/test_gcp_sql_operator.py
@@ -492,8 +492,8 @@ class CloudSqlQueryValidationTest(unittest.TestCase):
          "Invalid database type 'wrong'. Must be one of ['postgres', 'mysql']"),
         ('project_id', 'location', 'instance_name', 'postgres', True, True,
          'SELECT * FROM TEST',
-         "Cloud Sql Proxy does not support SSL connections. SSL is not needed as"
-         " Cloud Sql Proxy provides encryption on its own"),
+         "Cloud SQL Proxy does not support SSL connections. SSL is not needed as"
+         " Cloud SQL Proxy provides encryption on its own"),
         ('project_id', 'location', 'instance_name', 'postgres', False, True,
          'SELECT * FROM TEST',
          "SSL connections requires sslcert to be set"),


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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


With regards,
Apache Git Services