Skip to content

Add Support for client_tags in TrinoHook Connections #45841

Open
@jjavieralonso

Description

Description

This feature introduces the client_tags parameter to the TrinoHook connections in Apache Airflow. It allows users to specify a list of client tags when establishing a connection to Trino.

Use case/motivation

The addition of the client_tags parameter enables users to tag their Trino clients with specific identifiers, which can be useful for tracking and managing queries, especially in multi-tenant environments or for monitoring purposes. This feature enhances the flexibility and usability of Trino connections within Apache Airflow.

Related issues

Key Changes:
File: airflow/providers/trino/hooks/trino.py

Added client_tags parameter in the get_conn method.
Updated the connection initialization to include the client_tags parameter.
File: docs/apache-airflow-providers-trino/connections.rst

Updated documentation to include client_tags in the list of extra connection parameters.
File: tests/providers/trino/hooks/test_trino.py

Added test_get_conn_client_tags to verify the correct handling of client_tags.
Updated assert_connection_called_with to check for client_tags in connection parameters.

Are you willing to submit a PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions