Downloads data from Google Drive Storage to Local Filesystem

The Google Drive is used to store daily use data, including documents and photos. Google Drive has built-in mechanisms to facilitate group work e.g. document editor, file sharing mechanisms.

Prerequisite Tasks

To use these operators, you must do a few things:

GCSToLocalFilesystemOperator

GoogleDriveToLocalOperator allows you to download data from Google Drive to local filesystem.

Below is an example of using this operator to download file from Google Drive to Local Filesystem.

tests/system/providers/google/cloud/transfers/example_gdrive_to_local.py[source]

download_from_gdrive_to_local = GoogleDriveToLocalOperator(
    task_id="download_from_gdrive_to_local",
    gcp_conn_id=CONNECTION_ID,
    folder_id="",
    file_name=DRIVE_FILE_NAME,
    output_file=OUTPUT_FILE,
)

Reference

For further information, look at:

Was this entry helpful?