airflow.models.renderedtifields
¶
Save Rendered Template Fields
Module Contents¶
-
class
airflow.models.renderedtifields.
RenderedTaskInstanceFields
(ti, render_templates=True)[source]¶ Bases:
airflow.models.base.Base
Save Rendered Template Fields
-
classmethod
get_templated_fields
(cls, ti, session=None)[source]¶ Get templated field for a TaskInstance from the RenderedTaskInstanceFields table.
- Parameters
ti – Task Instance
session – SqlAlchemy Session
- Returns
Rendered Templated TI field
-
write
(self, session=None)[source]¶ Write instance to database
- Parameters
session – SqlAlchemy Session
-
classmethod
delete_old_records
(cls, task_id, dag_id, num_to_keep=conf.getint('core', 'max_num_rendered_ti_fields_per_task', fallback=0), session=None)[source]¶ Keep only Last X (num_to_keep) number of records for a task by deleting others
- Parameters
task_id – Task ID
dag_id – Dag ID
num_to_keep – Number of Records to keep
session – SqlAlchemy Session
-
classmethod