See virtualenv documentation for more information.:type system_site_packages: bool:param op_args: A list of positional arguments to pass to python_callable.:type op_kwargs: list:param op_kwargs: A dict of keyword arguments to pass to python_callable.:type op_kwargs: dict:param provide_context: if set to true, Airflow will pass a set of keyword … Note that if your virtualenv runs in a different Python major version than Airflow, you cannot use return values, op_args, op_kwargs, or use any macros that are being provided to Airflow through plugins. In addition, one can pass stuff through op_args and op_kwargs, and one can use a return value. Otherwise you wont have access to the most context variables of Airflow in op_kwargs. I tried two approaches: Approach 1: …įor airflow context variables make sure that you either have access to Airflow through setting system_site_packages to True or add apache-airflow to the requirements argument. I have a dag with two functions and I want to call one function in another in the dag. The Overflow Blog Level Up: Mastering statistics with Python part 2, Passing a function using op_kwargs (PythonVirtualOperator) in Airflow Dag. Browse other questions tagged python airflow or ask your own question.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |