I need to save some data while custom module installation. I save some static data using setup/InstallData.php. I need to process the existing order data and save it into my custom table. Is there any other way to save instead of setup/InstallData.php. Is this good to call controller function inside the setup/InstallData.php.
I am using Magento 2.2.6