-
Notifications
You must be signed in to change notification settings - Fork 14.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Support for client_tags in TrinoHook Connections #45841
Comments
Thanks for opening your first issue here! Be sure to follow the issue template! If you are willing to raise PR to address this issue please do so, no need to wait for approval. |
Hi @potiuk , |
Sure |
Hi @jjavieralonso , |
@wei-juncheng maybe we should customize the Trino UI connection form for easier setup? Similar to what we have for Snowflake: airflow/providers/snowflake/src/airflow/providers/snowflake/hooks/snowflake.py Lines 94 to 117 in 7e9b9ed
airflow/providers/snowflake/src/airflow/providers/snowflake/hooks/snowflake.py Lines 119 to 150 in 7e9b9ed
|
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?
Code of Conduct
The text was updated successfully, but these errors were encountered: