blob: 7c80769a6016872134456ae0ffecb37be86218b8 [file] [log] [blame]
:mod:`airflow.models.renderedtifields`
======================================
.. py:module:: airflow.models.renderedtifields
.. autoapi-nested-parse::
Save Rendered Template Fields
Module Contents
---------------
.. py:class:: RenderedTaskInstanceFields(ti, render_templates=True)
Bases: :class:`airflow.models.base.Base`
Save Rendered Template Fields
.. attribute:: __tablename__
:annotation: = rendered_task_instance_fields
.. attribute:: dag_id
.. attribute:: task_id
.. attribute:: execution_date
.. attribute:: rendered_fields
.. method:: __repr__(self)
.. classmethod:: get_templated_fields(cls, ti, session=None)
Get templated field for a TaskInstance from the RenderedTaskInstanceFields
table.
:param ti: Task Instance
:param session: SqlAlchemy Session
:return: Rendered Templated TI field
.. method:: write(self, session=None)
Write instance to database
:param 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)
Keep only Last X (num_to_keep) number of records for a task by deleting others
:param task_id: Task ID
:param dag_id: Dag ID
:param num_to_keep: Number of Records to keep
:param session: SqlAlchemy Session