airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] sprzedwojski commented on a change in pull request #4251: [AIRFLOW-2440] Add Google Cloud SQL import/export operator
Date Mon, 03 Dec 2018 12:55:42 GMT
sprzedwojski commented on a change in pull request #4251: [AIRFLOW-2440] Add Google Cloud SQL
import/export operator
URL: https://github.com/apache/incubator-airflow/pull/4251#discussion_r238257116
 
 

 ##########
 File path: airflow/contrib/hooks/gcp_sql_hook.py
 ##########
 @@ -254,6 +254,54 @@ def delete_database(self, project, instance, database):
         operation_name = response["name"]
         return self._wait_for_operation_to_complete(project, operation_name)
 
+    def export_instance(self, project_id, instance_id, body):
+        """
+        Exports data from a Cloud SQL instance to a Cloud Storage bucket as a SQL dump
+        or CSV file.
+
+        :param project_id: Project ID of the project where the instance exists.
+        :type project_id: str
+        :param instance_id: Name of the Cloud SQL instance. This does not include the
+            project ID.
+        :type instance_id: str
+        :param body: The request body, as described in
+            https://cloud.google.com/sql/docs/mysql/admin-api/v1beta4/instances/export#request-body
+        :type body: dict
+        :return: True if the operation succeeded, raises an error otherwise
+        :rtype: bool
+        """
+        response = self.get_conn().instances().export(
 
 Review comment:
   Done

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

Mime
View raw message