blob: 0a13d8dead56d320d4b6cf024bf1993fc80b5586 [file] [log] [blame]
:mod:`airflow.contrib.operators.gcs_to_s3`
==========================================
.. py:module:: airflow.contrib.operators.gcs_to_s3
Module Contents
---------------
.. py:class:: GoogleCloudStorageToS3Operator(bucket, prefix=None, delimiter=None, google_cloud_storage_conn_id='google_cloud_storage_default', delegate_to=None, dest_aws_conn_id=None, dest_s3_key=None, dest_verify=None, replace=False, *args, **kwargs)
Bases: :class:`airflow.contrib.operators.gcs_list_operator.GoogleCloudStorageListOperator`
Synchronizes a Google Cloud Storage bucket with an S3 bucket.
:param bucket: The Google Cloud Storage bucket to find the objects. (templated)
:type bucket: str
:param prefix: Prefix string which filters objects whose name begin with
this prefix. (templated)
:type prefix: str
:param delimiter: The delimiter by which you want to filter the objects. (templated)
For e.g to lists the CSV files from in a directory in GCS you would use
delimiter='.csv'.
:type delimiter: str
:param google_cloud_storage_conn_id: The connection ID to use when
connecting to Google Cloud Storage.
:type google_cloud_storage_conn_id: str
:param delegate_to: The account to impersonate, if any.
For this to work, the service account making the request must have
domain-wide delegation enabled.
:type delegate_to: str
:param dest_aws_conn_id: The destination S3 connection
:type dest_aws_conn_id: str
:param dest_s3_key: The base S3 key to be used to store the files. (templated)
:type dest_s3_key: str
:param dest_verify: Whether or not to verify SSL certificates for S3 connection.
By default SSL certificates are verified.
You can provide the following values:
- ``False``: do not validate SSL certificates. SSL will still be used
(unless use_ssl is False), but SSL certificates will not be
verified.
- ``path/to/cert/bundle.pem``: A filename of the CA cert bundle to uses.
You can specify this argument if you want to use a different
CA cert bundle than the one used by botocore.
:type dest_verify: bool or str
:param replace: Whether or not to verify the existence of the files in the
destination bucket.
By default is set to False
If set to True, will upload all the files replacing the existing ones in
the destination bucket.
If set to False, will upload only the files that are in the origin but not
in the destination bucket.
:type replace: bool
.. attribute:: template_fields
:annotation: = ['bucket', 'prefix', 'delimiter', 'dest_s3_key']
.. attribute:: ui_color
:annotation: = #f0eee4
.. method:: execute(self, context)