This utility script was developed as part of the project that requires me to connect to serveral databases at once, collect the output from each database and produce an excel or csv extract from those results. The tool also has the proper error handling function implemented and will have an error log created in case of any errors during the run.
- Copy the .py script to your local folder.
- Open the terminal and cd into the folder where the file is stored.
- Type in
python filename.py
Once executed the python,
- The user will have an option to use a config file if he has one set up.
- If not, it will ask you a series of yes or no questions.
- Depending on your answers, it will be executing your sql file across all sites or selected sites.
- It will display the completion message at the end of the run and output (excel or csv) will be ready at the folder that you specified.
- If there are any errors, error log will be created.