You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "sunank200 (via GitHub)" <gi...@apache.org> on 2025/02/24 05:56:34 UTC

Re: [PR] Add Trino Connection UI Fields Placeholders [airflow]

sunank200 commented on code in PR #46996:
URL: https://github.com/apache/airflow/pull/46996#discussion_r1967069981


##########
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

Review Comment:
   Why import here? It can be at top of the file.



##########
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:
   What does this mean? `"login": "Effective user for 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