blob: c1606ceb55a4f09850810283a4108066653b1bf8 [file] [log] [blame]
:mod:`airflow.contrib.operators.gcs_download_operator`
======================================================
.. py:module:: airflow.contrib.operators.gcs_download_operator
Module Contents
---------------
.. py:class:: GoogleCloudStorageDownloadOperator(bucket, object, filename=None, store_to_xcom_key=None, google_cloud_storage_conn_id='google_cloud_default', delegate_to=None, *args, **kwargs)
Bases::class:`airflow.models.BaseOperator`
Downloads a file from Google Cloud Storage.
:param bucket: The Google cloud storage bucket where the object is. (templated)
:type bucket: str
:param object: The name of the object to download in the Google cloud
storage bucket. (templated)
:type object: str
:param filename: The file path on the local file system (where the
operator is being executed) that the file should be downloaded to. (templated)
If no filename passed, the downloaded data will not be stored on the local file
system.
:type filename: str
:param store_to_xcom_key: If this param is set, the operator will push
the contents of the downloaded file to XCom with the key set in this
parameter. If not set, the downloaded data will not be pushed to XCom. (templated)
:type store_to_xcom_key: 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
.. attribute:: template_fields
:annotation: = ['bucket', 'object', 'filename', 'store_to_xcom_key']
.. attribute:: ui_color
:annotation: = #f0eee4
.. method:: execute(self, context)