Google Calendar to Google Cloud Storage Transfer Operators¶
Google has a service Google Cloud Storage. This service is used to store large data from various applications.
With Google Calendar, you can quickly schedule meetings and events and get reminders about upcoming activities, so you always know what’s next.
Prerequisite Tasks¶
To use these operators, you must do a few things:
Select or create a Cloud Platform project using the Cloud Console.
Enable billing for your project, as described in the Google Cloud documentation.
Enable the API, as described in the Cloud Console documentation.
Install API libraries via pip.
pip install 'apache-airflow[google]'Detailed information is available for Installation.
Upload data from Google Calendar to GCS¶
To upload data from Google Calendar to Google Cloud Storage you can use the
GoogleCalendarToGCSOperator
.
upload_calendar_to_gcs = GoogleCalendarToGCSOperator(
task_id="upload_calendar_to_gcs",
destination_bucket=BUCKET_NAME,
calendar_id=CALENDAR_ID,
api_version=API_VERSION,
)
You can use Jinja templating with
calendar_id
, destination_bucket
, destination_path
, impersonation_chain
.