async def list_files_and_ingest_files_data_to_sentinel(self):
        """Read files list and ingest data to sentinel."""
        __method_name = inspect.currentframe().f_code.co_name
        try:
            parent_dir = ShareDirectoryClient.from_connection_string(
                conn_str=consts.CONNECTION_STRING,
                share_name=self.share_name,
                directory_path="",
            )
            count_data = 0
            file_names_to_query = self.get_files_list(parent_dir)
            file_names_to_get_data = self.return_file_names_to_query(file_names_to_query)
            if len(file_names_to_query) == 0:
                applogger.info(
                    "{}(method={}) : {} ({}) : The data is not yet processed for duplication.".format(
                        consts.LOGS_STARTS_WITH,
                        __method_name,
                        consts.NETSKOPE_AZURE_STORAGE_TO_SENTINEL,
                        self.nskp_data_type_for_logging,
                    )
                )

            async with aiohttp.ClientSession() as session:
                for file in file_names_to_get_data:
                    file_data = self.get_data_from_file(file)
                    if file_data is not None:
                        if self.is_response_empty(json.loads(file_data)):
                            applogger.info(
                                "{}(method={}) : {} ({}) : File Data was empty, hence deleting : {}.".format(
                                    consts.LOGS_STARTS_WITH,
                                    __method_name,
                                    consts.NETSKOPE_AZURE_STORAGE_TO_SENTINEL,
                                    self.nskp_data_type_for_logging,
                                    file,
                                )
                            )
                        elif len(file_data) > 26214400:
                            await self.generate_chunks_and_ingest_data_to_sentinel(file_data, self.share_name, session)
                            count_data += 1
                            applogger.info(
                                "{}(method={}) : {} ({}) : Total files posted to Sentinel Till now : {}.".format(
                                    consts.LOGS_STARTS_WITH,
                                    __method_name,
                                    consts.NETSKOPE_AZURE_STORAGE_TO_SENTINEL,
                                    self.nskp_data_type_for_logging,
                                    count_data,
                                )
                            )
                        else:
                            await post_data(
                                json.dumps(json.loads(file_data)["result"]),
                                self.share_name,
                                session,
                            )
                            applogger.info(
                                "{}(method={}) : {} ({}) : Netskope data posted successfully of file : {}.".format(
                                    consts.LOGS_STARTS_WITH,
                                    __method_name,
                                    consts.NETSKOPE_AZURE_STORAGE_TO_SENTINEL,
                                    self.nskp_data_type_for_logging,
                                    file,
                                )
                            )
                            count_data += 1
                            applogger.info(
                                "{}(method={}) : {} ({}) : Total files posted to Sentinel Till now : {}.".format(
                                    consts.LOGS_STARTS_WITH,
                                    __method_name,
                                    consts.NETSKOPE_AZURE_STORAGE_TO_SENTINEL,
                                    self.nskp_data_type_for_logging,
                                    count_data,
                                )
                            )
                    self.delete_file_from_file_share(file, parent_dir)
        except NetskopeException:
            applogger.error(
                "{}(method={}) : {} ({}) : Error occurred in Netskope azure storage to sentinel.".format(
                    consts.LOGS_STARTS_WITH,
                    __method_name,
                    consts.NETSKOPE_AZURE_STORAGE_TO_SENTINEL,
                    self.nskp_data_type_for_logging,
                )
            )
            raise NetskopeException()
        except Exception as error:
            applogger.error(
                "{}(method={}) : {} ({}) : Error occurred in netskope azure storage to sentinel, Error-{}.".format(
                    consts.LOGS_STARTS_WITH,
                    __method_name,
                    consts.NETSKOPE_AZURE_STORAGE_TO_SENTINEL,
                    self.nskp_data_type_for_logging,
                    error,
                )
            )
            raise NetskopeException()
Read files list and ingest data to sentinel.
Solutions/Netskopev2/Data Connectors/NetskopeDataConnector/StorageToSentinel/netskope_azure_storage_to_sentinel.py