Google Drive to Google Cloud Storage Transfer Operator¶
Google has two services that store data. The Google Cloud Storage is used to store large data from various applications. The Google Drive is used to store daily use data, including documents and photos. Google Cloud Storage has strong integration with Google Cloud services. Google Drive has built-in mechanisms to facilitate group work e.g. document editor, file sharing mechanisms.
Transfer files between Google Storage and Google Drive is performed with the
Copy single files¶
The following Operator copies a single file from a shared Google Drive folder to a Google Cloud Storage Bucket.
Note that you can transfer a file from the root folder of a shared drive by passing the id of the shared
drive to both the
upload_gdrive_to_gcs = GoogleDriveToGCSOperator( task_id="upload_gdrive_object_to_gcs", folder_id=FOLDER_ID, file_name=FILE_NAME, bucket_name=BUCKET, object_name=OBJECT, )
You can use Jinja templating with
parameters which allows you to dynamically determine values.