Airflow Summit 2025 is coming October 07-09. Register now for early bird ticket!

airflow.providers.papermill.operators.papermill

Classes

NoteBook

Jupyter notebook.

PapermillOperator

Executes a jupyter notebook through papermill that is annotated with parameters.

Module Contents

class airflow.providers.papermill.operators.papermill.NoteBook[source]

Bases: airflow.providers.common.compat.lineage.entities.File

Jupyter notebook.

template_fields: ClassVar[collections.abc.Collection[str]][source]
type_hint: str | None = 'jupyter_notebook'[source]
parameters: dict | None[source]
meta_schema: str = 'airflow.providers.papermill.operators.papermill.NoteBook'[source]
class airflow.providers.papermill.operators.papermill.PapermillOperator(*, input_nb=None, output_nb=None, parameters=None, kernel_name=None, language_name=None, kernel_conn_id=None, nbconvert=False, nbconvert_args=None, **kwargs)[source]

Bases: airflow.models.BaseOperator

Executes a jupyter notebook through papermill that is annotated with parameters.

Parameters:
  • input_nb (str | NoteBook | None) – input notebook, either path or NoteBook inlet.

  • output_nb (str | NoteBook | None) – output notebook, either path or NoteBook outlet.

  • parameters (dict | None) – the notebook parameters to set

  • kernel_name (str | None) – (optional) name of kernel to execute the notebook against (ignores kernel name in the notebook document metadata)

supports_lineage = True[source]
template_fields: collections.abc.Sequence[str] = ('input_nb', 'output_nb', 'parameters', 'kernel_name', 'language_name', 'kernel_conn_id',...[source]
parameters = None[source]
input_nb = None[source]
output_nb = None[source]
kernel_name = None[source]
language_name = None[source]
kernel_conn_id = None[source]
nbconvert = False[source]
nbconvert_args = None[source]
execute(context)[source]

Derive when creating an operator.

Context is the same dictionary used as when rendering jinja templates.

Refer to get_template_context for more context.

property hook: airflow.providers.papermill.hooks.kernel.KernelHook | None[source]

Get valid hook.

Was this entry helpful?