Ctrl + K
DocumentationLog inGet started

tessl/pypi-apache-airflow-providers-dbt-cloud

tessl install tessl/pypi-apache-airflow-providers-dbt-cloud@4.4.0

Provider package for integrating Apache Airflow with dbt Cloud for data transformation workflow orchestration

Agent Success

Agent success rate when using this tile

84%

Improvement

Agent success rate improvement when using this tile compared to baseline

1x

Baseline

Agent success rate without this tile

84%

task.mdevals/scenario-10/

Job Run Status Monitor

A utility module for monitoring and reporting on dbt Cloud job run statuses in an Airflow pipeline.

Capabilities

Check Single Job Run Status

Query the status of a specific dbt Cloud job run and return its current state.

  • Given a valid run ID (67890), it returns the current status code @test
  • When the run ID does not exist, it handles the error gracefully @test

List Recent Job Runs

Retrieve a list of recent job runs for a specific job, with optional filtering.

  • Given a job ID (12345), it retrieves all runs for that job @test
  • When filtering by job ID, only runs for that specific job are returned @test

Get Detailed Run Information

Retrieve comprehensive details about a specific job run including related resource information.

  • Given a run ID (67890), it retrieves detailed run information with related resources included @test
  • The returned information includes metadata about the job execution @test

Implementation

@generates

API

from airflow.providers.dbt.cloud.hooks.dbt import DbtCloudHook
from typing import Any

class JobRunMonitor:
    """Monitor and query dbt Cloud job run statuses."""

    def __init__(self, dbt_cloud_conn_id: str = "dbt_cloud_default"):
        """
        Initialize the job run monitor.

        Args:
            dbt_cloud_conn_id: Airflow connection ID for dbt Cloud
        """
        pass

    def get_run_status(self, run_id: int, account_id: int | None = None) -> int:
        """
        Get the current status of a job run.

        Args:
            run_id: The ID of the job run to check
            account_id: Optional account ID (defaults to connection default)

        Returns:
            int: Status code representing the current state

        Raises:
            Exception: If the run cannot be found or an error occurs
        """
        pass

    def list_runs_for_job(
        self,
        job_id: int,
        account_id: int | None = None
    ) -> list[dict[str, Any]]:
        """
        List all runs for a specific job.

        Args:
            job_id: The ID of the job to query runs for
            account_id: Optional account ID (defaults to connection default)

        Returns:
            list[dict]: List of job run information dictionaries
        """
        pass

    def get_run_details(
        self,
        run_id: int,
        account_id: int | None = None,
        include_related: list[str] | None = None
    ) -> dict[str, Any]:
        """
        Get detailed information about a specific job run.

        Args:
            run_id: The ID of the job run to retrieve
            account_id: Optional account ID (defaults to connection default)
            include_related: List of related resources to include

        Returns:
            dict: Detailed job run information including metadata
        """
        pass

Dependencies { .dependencies }

apache-airflow-providers-dbt-cloud { .dependency }

Provides integration with dbt Cloud API for job run monitoring and status queries.

@satisfied-by

Version

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
pypipkg:pypi/apache-airflow-providers-dbt-cloud@4.4.x
tile.json