Exemple #1
0
    def test_remove(self, mock_lib, mock_fs):
        from airflow.providers.microsoft.azure.hooks.azure_data_lake import AzureDataLakeHook

        hook = AzureDataLakeHook(azure_data_lake_conn_id='adl_test_key')
        hook.remove('filepath', True)
        mock_fs.return_value.remove.assert_called_once_with('filepath',
                                                            recursive=True)
Exemple #2
0
    def execute(self, context: dict) -> Any:
        hook = AzureDataLakeHook(
            azure_data_lake_conn_id=self.azure_data_lake_conn_id)

        return hook.remove(path=self.path,
                           recursive=self.recursive,
                           ignore_not_found=self.ignore_not_found)