airflow.providers.amazon.aws.example_dags.example_google_api_youtube_to_s3
¶
This is a more advanced example dag for using GoogleApiToS3Operator which uses xcom to pass data between tasks to retrieve specific information about YouTube videos:
First it searches for up to 50 videos (due to pagination) in a given time range (YOUTUBE_VIDEO_PUBLISHED_AFTER, YOUTUBE_VIDEO_PUBLISHED_BEFORE) on a YouTube channel (YOUTUBE_CHANNEL_ID) saves the response in S3 + passes over the YouTube IDs to the next request which then gets the information (YOUTUBE_VIDEO_FIELDS) for the requested videos and saves them in S3 (S3_DESTINATION_KEY).
Further information:
YOUTUBE_VIDEO_PUBLISHED_AFTER and YOUTUBE_VIDEO_PUBLISHED_BEFORE needs to be formatted
YYYY-MM-DDThh:mm:ss.sZ
.
See https://developers.google.com/youtube/v3/docs/search/list for more information.
YOUTUBE_VIDEO_PARTS depends on the fields you pass via YOUTUBE_VIDEO_FIELDS. See
https://developers.google.com/youtube/v3/docs/videos/list#parameters for more information.
YOUTUBE_CONN_ID is optional for public videos. It does only need to authenticate when there are private videos
on a YouTube channel you want to retrieve.
Module Contents¶
Functions¶
|
Attributes¶
- airflow.providers.amazon.aws.example_dags.example_google_api_youtube_to_s3.YOUTUBE_CHANNEL_ID[source]¶
- airflow.providers.amazon.aws.example_dags.example_google_api_youtube_to_s3.YOUTUBE_VIDEO_PUBLISHED_AFTER[source]¶
- airflow.providers.amazon.aws.example_dags.example_google_api_youtube_to_s3.YOUTUBE_VIDEO_PUBLISHED_BEFORE[source]¶
- airflow.providers.amazon.aws.example_dags.example_google_api_youtube_to_s3.YOUTUBE_VIDEO_PARTS[source]¶
- airflow.providers.amazon.aws.example_dags.example_google_api_youtube_to_s3.YOUTUBE_VIDEO_FIELDS[source]¶