Update example_python_operator.py

This commit is contained in:
2022-01-08 17:39:02 +08:00
parent 1bd80905a6
commit 2a742c5cc5
+1 -1
View File
@@ -17,7 +17,7 @@ with DAG(
tags=['example'], tags=['example'],
) as dag: ) as dag:
# [START howto_operator_python] # [START howto_operator_python]
@task(task_id="print_the_context") @task.virtualenv(task_id="virtualenv_python", requirements=["sklearn"], system_site_packages=False)
def print_context(ds=None, **kwargs): def print_context(ds=None, **kwargs):
"""Print the Airflow context and ds variable from the context.""" """Print the Airflow context and ds variable from the context."""
print(ds) print(ds)