Skip to content

Commit 641ad73

Browse files
Migrate apache/hive connection UI metadata to YAML (#62380)
1 parent 7dfd39b commit 641ad73

2 files changed

Lines changed: 52 additions & 0 deletions

File tree

providers/apache/hive/provider.yaml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,39 @@ transfers:
142142
connection-types:
143143
- hook-class-name: airflow.providers.apache.hive.hooks.hive.HiveCliHook
144144
connection-type: hive_cli
145+
ui-field-behaviour:
146+
hidden-fields:
147+
- extra
148+
relabeling: {}
149+
conn-fields:
150+
use_beeline:
151+
label: Use Beeline
152+
schema:
153+
type:
154+
- boolean
155+
- 'null'
156+
default: true
157+
proxy_user:
158+
label: Proxy User
159+
schema:
160+
type:
161+
- string
162+
- 'null'
163+
default: ''
164+
principal:
165+
label: Principal
166+
schema:
167+
type:
168+
- string
169+
- 'null'
170+
default: 'hive/_HOST@EXAMPLE.COM'
171+
high_availability:
172+
label: High Availability mode
173+
schema:
174+
type:
175+
- boolean
176+
- 'null'
177+
default: false
145178
- hook-class-name: airflow.providers.apache.hive.hooks.hive.HiveServer2Hook
146179
connection-type: hiveserver2
147180
- hook-class-name: airflow.providers.apache.hive.hooks.hive.HiveMetastoreHook

providers/apache/hive/src/airflow/providers/apache/hive/get_provider_info.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,25 @@ def get_provider_info():
9696
{
9797
"hook-class-name": "airflow.providers.apache.hive.hooks.hive.HiveCliHook",
9898
"connection-type": "hive_cli",
99+
"ui-field-behaviour": {"hidden-fields": ["extra"], "relabeling": {}},
100+
"conn-fields": {
101+
"use_beeline": {
102+
"label": "Use Beeline",
103+
"schema": {"type": ["boolean", "null"], "default": True},
104+
},
105+
"proxy_user": {
106+
"label": "Proxy User",
107+
"schema": {"type": ["string", "null"], "default": ""},
108+
},
109+
"principal": {
110+
"label": "Principal",
111+
"schema": {"type": ["string", "null"], "default": "hive/_HOST@EXAMPLE.COM"},
112+
},
113+
"high_availability": {
114+
"label": "High Availability mode",
115+
"schema": {"type": ["boolean", "null"], "default": False},
116+
},
117+
},
99118
},
100119
{
101120
"hook-class-name": "airflow.providers.apache.hive.hooks.hive.HiveServer2Hook",

0 commit comments

Comments
 (0)