dstandish commented on code in PR #30943:
URL: https://github.com/apache/airflow/pull/30943#discussion_r1180612292
##########
airflow/models/abstractoperator.py:
##########
@@ -564,7 +566,7 @@ def _do_render_template_fields(
f"{attr_name!r} is configured as a template field "
f"but {parent.task_type} does not have this attribute."
)
- if not value:
+ if isinstance(value, pd.DataFrame) or not value:
Review Comment:
I could be wrong but i think pandas is not a requirement of core airflow so
we shouldn't import it here.
Why not simply `is not None`? Are we concerned that could break an existing
workflow? Otherwise we could use getattr or hasattr.
To avoid importing pandas, and still be specific, we could do `try not
value` then in an except block look at something like `if not getattr(x,
'empty', True)` (i think it might actually be a method but same idear) and that
would handle the dataframe case.
--
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]