You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/09/14 13:55:35 UTC

[GitHub] [airflow] josh-fell commented on a diff in pull request #26345: Add DataFlow operations to Azure DataFactory hook

josh-fell commented on code in PR #26345:
URL: https://github.com/apache/airflow/pull/26345#discussion_r970243635


##########
airflow/providers/microsoft/azure/hooks/data_factory.py:
##########
@@ -477,12 +479,121 @@ def delete_dataset(
         Delete the dataset.
 
         :param dataset_name: The dataset name.
-        :param resource_group_name: The dataset name.
+        :param resource_group_name: The resource group name.

Review Comment:
   Nice catch!



##########
airflow/providers/microsoft/azure/hooks/data_factory.py:
##########
@@ -479,12 +481,121 @@ def delete_dataset(
         Delete the dataset.
 
         :param dataset_name: The dataset name.
-        :param resource_group_name: The dataset name.
+        :param resource_group_name: The resource group name.
         :param factory_name: The factory name.
         :param config: Extra parameters for the ADF client.
         """
         self.get_conn().datasets.delete(resource_group_name, factory_name, dataset_name, **config)
 
+    @provide_targeted_factory
+    def get_dataflow(
+        self,
+        dataflow_name: str,
+        resource_group_name: str | None = None,
+        factory_name: str | None = None,
+        **config: Any,
+    ) -> DataFlow:
+        """
+        Get the dataflow.
+
+        :param dataflow_name: The dataflow name.
+        :param resource_group_name: The resource group name.
+        :param factory_name: The factory name.
+        :param config: Extra parameters for the ADF client.
+        :return: The dataflow.
+        """
+        return self.get_conn().data_flows.get(resource_group_name, factory_name, dataflow_name, **config)
+
+    def _dataflow_exists(
+        self,
+        dataflow_name: str,
+        resource_group_name: str | None = None,
+        factory_name: str | None = None,

Review Comment:
   Would these ever actually be `None`? I assume the methods calling this one would have had the `resource_group_name` and `factory_name` applied already (if not provided explicitly prior).



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