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-5/

dbt Cloud API Client with Custom Tracking

Create a Python client for the dbt Cloud API that automatically identifies itself with version-specific tracking headers for API usage analytics and debugging support.

Capabilities

HTTP Client Initialization

  • The client initializes with an API token and optional tenant URL @test
  • The client defaults to the standard dbt Cloud tenant URL when no custom tenant is provided @test

Request Header Management

  • All API requests include a User-Agent header that identifies the client library and version @test
  • The User-Agent header follows the format "client-name/version" @test

Authentication

  • The client includes the API token in request headers for authentication @test

Basic API Operations

  • The client can make GET requests to dbt Cloud API endpoints @test
  • The client can retrieve account information from the dbt Cloud API @test

Implementation

@generates

API

class DbtCloudClient:
    """
    A client for interacting with the dbt Cloud API with automatic version tracking.

    Args:
        api_token: The dbt Cloud API authentication token
        tenant: Optional custom tenant URL (defaults to cloud.getdbt.com)
        version: The version string for the client library
    """
    def __init__(self, api_token: str, tenant: str = "cloud.getdbt.com", version: str = "1.0.0"):
        pass

    def get_account(self, account_id: int) -> dict:
        """
        Retrieve information about a specific dbt Cloud account.

        Args:
            account_id: The dbt Cloud account ID

        Returns:
            A dictionary containing account information
        """
        pass

    def _make_request(self, method: str, endpoint: str) -> dict:
        """
        Make an authenticated request to the dbt Cloud API with tracking headers.

        Args:
            method: HTTP method (GET, POST, etc.)
            endpoint: API endpoint path

        Returns:
            JSON response as a dictionary
        """
        pass

Dependencies { .dependencies }

requests { .dependency }

Provides HTTP client functionality for API requests.

@satisfied-by

Version

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