wei-juncheng commented on code in PR #46996:
URL: https://github.com/apache/airflow/pull/46996#discussion_r1967128306


##########
providers/trino/src/airflow/providers/trino/hooks/trino.py:
##########
@@ -92,6 +92,42 @@ class TrinoHook(DbApiHook):
     query_id = ""
     _test_connection_sql = "select 1"
 
+    @classmethod
+    def get_ui_field_behaviour(cls) -> dict[str, Any]:
+        """Return custom field behaviour."""
+        import json
+
+        return {
+            "hidden_fields": [],
+            "relabeling": {},
+            "placeholders": {
+                "extra": json.dumps(
+                    {
+                        "auth": "authentication type",
+                        "impersonate_as_owner": "allow impersonate as owner",
+                        "jwt__token": "JWT token",
+                        "jwt__file": "JWT file path",
+                        "certs__client_cert_path": "Client certificate path",
+                        "certs__client_key_path": "Client key path",
+                        "kerberos__config": "Kerberos config",
+                        "kerberos__service_name": "Kerberos service name",
+                        "kerberos__mutual_authentication": "Kerberos mutual 
authentication",
+                        "kerberos__force_preemptive": "Kerberos force 
preemptive",
+                        "kerberos__hostname_override": "Kerberos hostname 
override",
+                        "kerberos__sanitize_mutual_error_response": "Kerberos 
sanitize mutual error response",
+                        "kerberos__principal": "Kerberos principal",
+                        "kerberos__delegate": "Kerberos delegate",
+                        "kerberos__ca_bundle": "Kerberos CA bundle",
+                        "session_properties": "session properties",
+                        "client_tags": "Trino client tags. Example 
['sales','cluster1']",
+                        "timezone": "Trino timezone",
+                    },
+                    indent=1,
+                ),
+                "login": "Effective user for connection",

Review Comment:
   This is the text I directly referenced from the [official Airflow 
documentation](https://airflow.apache.org/docs/apache-airflow-providers-trino/stable/connections.html).
 If this may confuse users, would modifying it to "Effective Trino user for 
connection" make it clearer?
   <img width="1445" alt="ζˆͺεœ– 2025-02-24 δΈ‹εˆ3 11 58" 
src="https://github.com/user-attachments/assets/a6e23a76-6e60-4f6d-bb53-5f5115694bd2";
 />
   



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to