Downloads data from Google Cloud Storage to Local Filesystem¶
The Google Cloud Storage (GCS) is used to store large data from various applications. This page shows how to download data from GCS to local filesystem.
Prerequisite Tasks¶
GCSToLocalFilesystemOperator¶
GCSToLocalFilesystemOperator
allows you to download
data from GCS to local filesystem.
Below is an example of using this operator to upload a file to GCS.
download_file = GCSToLocalFilesystemOperator(
task_id="download_file",
object_name=PATH_TO_REMOTE_FILE,
bucket=BUCKET,
filename=PATH_TO_LOCAL_FILE,
)