airflow.providers.papermill.operators.papermill

Module Contents

Classes

NoteBook

Jupyter notebook

PapermillOperator

Executes a jupyter notebook through papermill that is annotated with parameters

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

Bases: airflow.lineage.entities.File

Jupyter notebook

type_hint :Optional[str] = jupyter_notebook[source]
parameters :Optional[Dict][source]
meta_schema :str[source]
class airflow.providers.papermill.operators.papermill.PapermillOperator(*, input_nb=None, output_nb=None, parameters=None, kernel_name=None, **kwargs)[source]

Bases: airflow.models.BaseOperator

Executes a jupyter notebook through papermill that is annotated with parameters

Parameters
  • input_nb (Optional[str]) -- input notebook (can also be a NoteBook or a File inlet)

  • output_nb (Optional[str]) -- output notebook (can also be a NoteBook or File outlet)

  • parameters (Optional[Dict]) -- the notebook parameters to set

  • kernel_name (Optional[str]) -- (optional) name of kernel to execute the notebook against (ignores kernel name in the notebook document metadata)

supports_lineage = True[source]
template_fields :Sequence[str] = ['input_nb', 'output_nb', 'parameters', 'kernel_name'][source]
execute(self, context)[source]

This is the main method to derive when creating an operator. Context is the same dictionary used as when rendering jinja templates.

Refer to get_template_context for more context.

Was this entry helpful?