You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "jjavieralonso (via GitHub)" <gi...@apache.org> on 2025/01/21 16:21:15 UTC
[I] Add Support for client_tags in TrinoHook Connections [airflow]
jjavieralonso opened a new issue, #45841:
URL: https://github.com/apache/airflow/issues/45841
### 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
- [x] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Add Support for client_tags in TrinoHook Connections [airflow]
Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on issue #45841:
URL: https://github.com/apache/airflow/issues/45841#issuecomment-2613942585
Sure
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Add Support for client_tags in TrinoHook Connections [airflow]
Posted by "eladkal (via GitHub)" <gi...@apache.org>.
eladkal commented on issue #45841:
URL: https://github.com/apache/airflow/issues/45841#issuecomment-2662482692
@wei-juncheng maybe we should customize the Trino UI connection form for easier setup?
https://airflow.apache.org/docs/apache-airflow/stable/howto/connection.html#custom-connection-fields
Similar to what we have for Snowflake:
https://github.com/apache/airflow/blob/7e9b9edd76a9535fd6137ab33142f2c735eb4d4b/providers/snowflake/src/airflow/providers/snowflake/hooks/snowflake.py#L94-L117
https://github.com/apache/airflow/blob/7e9b9edd76a9535fd6137ab33142f2c735eb4d4b/providers/snowflake/src/airflow/providers/snowflake/hooks/snowflake.py#L119-L150
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Add Support for client_tags in TrinoHook Connections [airflow]
Posted by "wei-juncheng (via GitHub)" <gi...@apache.org>.
wei-juncheng commented on issue #45841:
URL: https://github.com/apache/airflow/issues/45841#issuecomment-2608988318
Hi @potiuk ,
could you please assign this issue to me? I am also using TrinoHook and interested in this issue. I'm currently investigating it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Add Support for client_tags in TrinoHook Connections [airflow]
Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk closed issue #45841: Add Support for client_tags in TrinoHook Connections
URL: https://github.com/apache/airflow/issues/45841
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Add Support for client_tags in TrinoHook Connections [airflow]
Posted by "boring-cyborg[bot] (via GitHub)" <gi...@apache.org>.
boring-cyborg[bot] commented on issue #45841:
URL: https://github.com/apache/airflow/issues/45841#issuecomment-2605184349
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.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Add Support for client_tags in TrinoHook Connections [airflow]
Posted by "wei-juncheng (via GitHub)" <gi...@apache.org>.
wei-juncheng commented on issue #45841:
URL: https://github.com/apache/airflow/issues/45841#issuecomment-2651282120
Hi @jjavieralonso ,
I would like to confirm with you that currently, `TrinoHook` allows system administrators to input `client_tags` through the `Extra` parameter when creating a connection. Airflow will then pass the client tag into the Trino connection. In this issue, are you looking for more flexibility to input different client tags when the DAG is running (e.g., DAG information or function information)?
- [Apache Trino Connection Document](https://airflow.apache.org/docs/apache-airflow-providers-trino/stable/connections.html)
- [Trino's Official Document](https://trino.io/blog/2022/07/13/how-to-use-airflow-to-schedule-trino-jobs.html#creating-a-trino-connection)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org