sempy_labs.apache_airflow_job package

Module contents

sempy_labs.apache_airflow_job.create_or_update_apache_airflow_job_file(apache_airflow_job: str | UUID, file_path: str, file_content: bytes, workspace: str | UUID | None = None)

Creates or updates an Apache Airflow job file.

This is a wrapper function for the following API: Files - Create Or Update Apache Airflow Job File.

Service Principal Authentication is supported (see here for examples).

Parameters:
  • apache_airflow_job (str | uuid.UUID) – The Apache Airflow job name or ID.

  • file_path (str) – The file path relative to the Apache Airflow job root. It must begin with either ‘dags/’ or ‘plugins/’ (for example, dags/example_dag.py).

  • file_content (bytes) – The file content. Text files must be UTF-8 encoded.

  • workspace (str | uuid.UUID, default=None) – The Fabric workspace name or ID. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook.

sempy_labs.apache_airflow_job.delete_apache_airflow_job(apache_airflow_job: str | UUID, workspace: str | UUID | None = None)

Deletes a Fabric Apache Airflow Job.

Parameters:
  • apache_airflow_job (str | UUID) – The name or ID of the Apache Airflow Job to delete.

  • workspace (str | uuid.UUID, default=None) – The Fabric workspace name or ID. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook.

sempy_labs.apache_airflow_job.delete_apache_airflow_job_file(apache_airflow_job: str | UUID, file_path: str, workspace: str | UUID | None = None)

Deletes a file from a Fabric Apache Airflow Job.

This is a wrapper function for the following API: Files - Delete Apache Airflow Job File.

Service Principal Authentication is supported (see here for examples).

Parameters:
  • apache_airflow_job (str | uuid.UUID) – The Apache Airflow job name or ID.

  • file_path (str) – The file path relative to the Apache Airflow job root. It must begin with either ‘dags/’ or ‘plugins/’ (for example, dags/example_dag.py).

  • workspace (str | uuid.UUID, default=None) – The Fabric workspace name or ID. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook.

sempy_labs.apache_airflow_job.list_apache_airflow_job_files(apache_airflow_job: str | UUID, workspace: str | UUID | None = None, root_path: str | None = None) DataFrame

Shows a list of Apache Airflow job files from the specified Apache Airflow job.

This is a wrapper function for the following API: Files - List Apache Airflow Job Files.

Service Principal Authentication is supported (see here for examples).

Parameters:
  • apache_airflow_job (str | uuid.UUID) – The Apache Airflow job name or ID.

  • workspace (str | uuid.UUID, default=None) – The Fabric workspace name or ID. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook.

  • root_path (str, default=None) – The folder path to list. If not provided, the root directory is used.

Returns:

A pandas dataframe showing a list of Apache Airflow job files from the specified Apache Airflow job.

Return type:

pandas.DataFrame

sempy_labs.apache_airflow_job.list_apache_airflow_jobs(workspace: str | UUID | None = None) DataFrame

Shows the Apache Airflow Jobs within a workspace.

This is a wrapper function for the following API: Items - List Apache Airflow Jobs.

Service Principal Authentication is supported (see here for examples).

Parameters:

workspace (str | uuid.UUID, default=None) – The Fabric workspace name or ID. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook.

Returns:

A pandas dataframe showing the Apache Airflow Jobs within a workspace.

Return type:

pandas.DataFrame