josh-fell commented on a change in pull request #15159:
URL: https://github.com/apache/airflow/pull/15159#discussion_r609750950



##########
File path: airflow/providers/microsoft/azure/hooks/azure_data_factory.py
##########
@@ -75,13 +75,57 @@ class AzureDataFactoryHook(BaseHook):  # pylint: 
disable=too-many-public-methods
     A hook to interact with Azure Data Factory.
 
     :param conn_id: The Azure Data Factory connection id.
+    :type conn_id: str
     """
 
     conn_type: str = 'azure_data_factory'
     conn_name_attr: str = 'azure_data_factory_conn_id'
     default_conn_name: str = 'azure_data_factory_default'
     hook_name: str = 'Azure Data Factory'
 
+    @staticmethod
+    def get_connection_form_widgets() -> Dict[str, Any]:
+        """Returns connection widgets to add to connection form"""
+        from flask_appbuilder.fieldwidgets import BS3TextFieldWidget
+        from flask_babel import lazy_gettext
+        from wtforms import StringField
+
+        return {
+            "extra__azure_data_factory__tenantId": StringField(
+                lazy_gettext('Azure Tenant ID'), widget=BS3TextFieldWidget()
+            ),
+            "extra__azure_data_factory__subscriptionId": StringField(
+                lazy_gettext('Azure Subscription ID'), 
widget=BS3TextFieldWidget()
+            ),
+        }
+
+    @staticmethod
+    def get_ui_field_behaviour() -> Dict:
+        """Returns custom field behaviour"""
+        import json
+
+        return {
+            "hidden_fields": ['schema', 'port', 'host'],
+            "relabeling": {
+                'login': 'Azure Client ID',
+                'password': 'Azure Secret',
+                'extra': 'Extra (optional)',
+            },
+            "placeholders": {
+                'extra': json.dumps(
+                    {
+                        "resourceGroup": "azure resource group name",
+                        "factory": "azure data factory name",
+                    },
+                    indent=1,
+                ),
+                'login': 'client_id',

Review comment:
       ```suggestion
                   'login': 'client id',
   ```




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

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to