Jump to content

Connect Leeroopedia MCP: Equip your AI agents to search best practices, build plans, verify code, diagnose failures, and look up hyperparameter defaults.

Implementation:Astronomer Astronomer cosmos TrinoCertificateProfileMapping

From Leeroopedia


Knowledge Sources
Domains Profile_Mapping, Trino
Last Updated 2026-02-07 17:00 GMT

Overview

Concrete tool for mapping Airflow trino connections to dbt trino profiles using certificate authentication, provided by astronomer-cosmos.

Description

The TrinoCertificateProfileMapping maps an Airflow trino connection to a dbt trino profile using the certificate authentication method. It extends TrinoBaseProfileMapping and sets `method="certificate"`, translating connection parameters into the YAML structure that dbt expects in `profiles.yml`.

Usage

Use this profile mapping when configuring Cosmos to run dbt commands against a Trino backend. Assign it to `ProfileConfig(profile_mapping=...)` when the target Airflow connection uses the `trino` connection type with certificate-based authentication.

Code Reference

Source Location

Signature

class TrinoCertificateProfileMapping(TrinoBaseProfileMapping):
    method: str = "certificate"

Import

from cosmos.profiles.trino import TrinoCertificateProfileMapping

I/O Contract

Inputs

Name Type Required Description
conn_id str Yes Airflow connection ID for Trino

Outputs

Name Type Description
profile dict dbt profile YAML dictionary
env_vars dict Environment variables for secret fields

Usage Examples

from cosmos.config import ProfileConfig
from cosmos.profiles.trino import TrinoCertificateProfileMapping

profile_config = ProfileConfig(
    profile_name="default",
    target_name="dev",
    profile_mapping=TrinoCertificateProfileMapping(conn_id="trino_default"),
)

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment