blob: e3c0c77e6c37547c8fb002f301b37e6a7cd37871 [file] [log] [blame]
:mod:`airflow.contrib.operators.file_to_gcs`
============================================
.. py:module:: airflow.contrib.operators.file_to_gcs
Module Contents
---------------
.. py:class:: FileToGoogleCloudStorageOperator(src, dst, bucket, google_cloud_storage_conn_id='google_cloud_default', mime_type='application/octet-stream', delegate_to=None, gzip=False, *args, **kwargs)
Bases: :class:`airflow.models.BaseOperator`
Uploads a file to Google Cloud Storage.
Optionally can compress the file for upload.
:param src: Path to the local file. (templated)
:type src: str
:param dst: Destination path within the specified bucket. (templated)
:type dst: str
:param bucket: The bucket to upload to. (templated)
:type bucket: str
:param google_cloud_storage_conn_id: The Airflow connection ID to upload with
:type google_cloud_storage_conn_id: str
:param mime_type: The mime-type string
:type mime_type: str
:param delegate_to: The account to impersonate, if any
:type delegate_to: str
:param gzip: Allows for file to be compressed and uploaded as gzip
:type gzip: bool
.. attribute:: template_fields
:annotation: = ['src', 'dst', 'bucket']
.. method:: execute(self, context)
Uploads the file to Google cloud storage