o-nikolas commented on a change in pull request #19237:
URL: https://github.com/apache/airflow/pull/19237#discussion_r737881176
##########
File path:
airflow/providers/amazon/aws/example_dags/example_google_api_to_s3_transfer_advanced.py
##########
@@ -33,13 +33,13 @@
on a YouTube channel you want to retrieve.
"""
+from datetime import datetime
from os import getenv
from airflow import DAG
from airflow.operators.dummy import DummyOperator
-from airflow.operators.python import BranchPythonOperator, get_current_context
+from airflow.operators.python import BranchPythonOperator
from airflow.providers.amazon.aws.transfers.google_api_to_s3 import
GoogleApiToS3Operator
-from airflow.utils.dates import days_ago
# [START howto_operator_google_api_to_s3_transfer_advanced_env_variables]
YOUTUBE_CONN_ID = getenv("YOUTUBE_CONN_ID", "google_cloud_default")
Review comment:
Hey folks,
All this makes perfect sense, and I wasn't by any means proposing we get rid
of all those variables. Just the single conn_id variable since the value it is
using is the default value for the operator so there is no need to pass it in.
This is a major point of this very PR. Where the `AWS_CONN_ID = 'aws_default'`
variable was removed from many operators in this change, since it's the default
value used anyway. But there is a getenv here which, I agree, some, docs or
test code may depend on, so keeping it is the safe thing to do :)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]