| :py:mod:`airflow.providers.amazon.aws.example_dags.example_google_api_youtube_to_s3` |
| ==================================================================================== |
| |
| .. py:module:: airflow.providers.amazon.aws.example_dags.example_google_api_youtube_to_s3 |
| |
| .. autoapi-nested-parse:: |
| |
| 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 |
| ~~~~~~~~~ |
| |
| .. autoapisummary:: |
| |
| airflow.providers.amazon.aws.example_dags.example_google_api_youtube_to_s3.transform_video_ids |
| |
| |
| |
| Attributes |
| ~~~~~~~~~~ |
| |
| .. autoapisummary:: |
| |
| airflow.providers.amazon.aws.example_dags.example_google_api_youtube_to_s3.YOUTUBE_CHANNEL_ID |
| airflow.providers.amazon.aws.example_dags.example_google_api_youtube_to_s3.YOUTUBE_VIDEO_PUBLISHED_AFTER |
| airflow.providers.amazon.aws.example_dags.example_google_api_youtube_to_s3.YOUTUBE_VIDEO_PUBLISHED_BEFORE |
| airflow.providers.amazon.aws.example_dags.example_google_api_youtube_to_s3.S3_BUCKET_NAME |
| airflow.providers.amazon.aws.example_dags.example_google_api_youtube_to_s3.YOUTUBE_VIDEO_PARTS |
| airflow.providers.amazon.aws.example_dags.example_google_api_youtube_to_s3.YOUTUBE_VIDEO_FIELDS |
| airflow.providers.amazon.aws.example_dags.example_google_api_youtube_to_s3.task_video_ids_to_s3 |
| |
| |
| .. py:data:: YOUTUBE_CHANNEL_ID |
| |
| |
| |
| |
| .. py:data:: YOUTUBE_VIDEO_PUBLISHED_AFTER |
| |
| |
| |
| |
| .. py:data:: YOUTUBE_VIDEO_PUBLISHED_BEFORE |
| |
| |
| |
| |
| .. py:data:: S3_BUCKET_NAME |
| |
| |
| |
| |
| .. py:data:: YOUTUBE_VIDEO_PARTS |
| |
| |
| |
| |
| .. py:data:: YOUTUBE_VIDEO_FIELDS |
| |
| |
| |
| |
| .. py:function:: transform_video_ids(**kwargs) |
| |
| |
| .. py:data:: task_video_ids_to_s3 |
| |
| |
| |
| |