Credentials block for credential use across dbt Cloud tasks and flows.Attributes:
api_key: API key to authenticate with the dbt Cloud
administrative API. Refer to the Authentication docs
for retrieving the API key.
account_id: ID of dbt Cloud account with which to interact.
domain: Domain at which the dbt Cloud API is hosted.
Examples:Load stored dbt Cloud credentials:
from prefect_dbt.cloud import DbtCloudCredentialsdbt_cloud_credentials = DbtCloudCredentials.load("BLOCK_NAME")
Use DbtCloudCredentials instance to trigger a job run:
from prefect_dbt.cloud import DbtCloudCredentialscredentials = DbtCloudCredentials(api_key="my_api_key", account_id=123456789)async with dbt_cloud_credentials.get_administrative_client() as client: client.trigger_job_run(job_id=1)