예제 #1
0
    def execute(self, context):

        hook = AzureDataLakeHook(
            azure_data_lake_conn_id=self.azure_data_lake_conn_id)

        self.log.info('Getting list of ADLS files in path: %s', self.path)

        return hook.list(path=self.path)
    def execute(self, context):

        hook = AzureDataLakeHook(
            azure_data_lake_conn_id=self.azure_data_lake_conn_id
        )

        self.log.info('Getting list of ADLS files in path: %s', self.path)

        return hook.list(path=self.path)
 def test_list_glob(self, mock_lib, mock_fs):
     from airflow.contrib.hooks.azure_data_lake_hook import AzureDataLakeHook
     hook = AzureDataLakeHook(azure_data_lake_conn_id='adl_test_key')
     hook.list('file_path/*')
     mock_fs.return_value.glob.assert_called_with('file_path/*')
예제 #4
0
 def test_list_walk(self, mock_lib, mock_fs):
     from airflow.contrib.hooks.azure_data_lake_hook import AzureDataLakeHook
     hook = AzureDataLakeHook(azure_data_lake_conn_id='adl_test_key')
     hook.list('file_path/some_folder/')
     mock_fs.return_value.walk.assert_called_with('file_path/some_folder/')
 def test_list_glob(self, mock_lib, mock_fs):
     from airflow.contrib.hooks.azure_data_lake_hook import AzureDataLakeHook
     hook = AzureDataLakeHook(azure_data_lake_conn_id='adl_test_key')
     hook.list('file_path/*')
     mock_fs.return_value.glob.assert_called_once_with('file_path/*')