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/13 07:41:29 UTC
[GitHub] [airflow] pankajkoti commented on a diff in pull request #26345: Add DataFlow operations to Azure DataFactory hook
pankajkoti commented on code in PR #26345:
URL: https://github.com/apache/airflow/pull/26345#discussion_r969260540
##########
airflow/providers/microsoft/azure/hooks/data_factory.py:
##########
@@ -477,12 +479,112 @@ 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: Optional[str] = None,
+ factory_name: Optional[str] = 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, resource_group_name, factory_name, dataflow_name) -> bool:
Review Comment:
Can we type annotate the arguments here? Also, since `resource_group_name` & `factory_name` could be `None`, does the `list_by_factory` method work well? Or do we need to handle the case separately for `None` values?
--
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