You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "potiuk (via GitHub)" <gi...@apache.org> on 2023/04/28 17:13:10 UTC
[GitHub] [airflow] potiuk commented on a diff in pull request #30943: Add support for dynamic tasks with template fields that contain `pandas.DataFrame`
potiuk commented on code in PR #30943:
URL: https://github.com/apache/airflow/pull/30943#discussion_r1180642766
##########
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:
Yes. @dstandish is righ - we should not have pandas in Airflow core - Airflow does not like Pandas (even though most people do like Pandas).
However maybe better is to simply try/catch ValueError in this place? Contrary to many languages handling exception in Python is not slow, and it's pretty normal to handle different flow by handling exceptions
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org