This is a Python Script that connects to a remote linux server to execute SQL Queries and then create a Word or PDF report based on the template provided currently.
This is what the script performs in steps:
- Connects to linux Host
- Reads an Sql file that contains Sql queries
- prints the queries
- Executes the Sql queries in the Database
- checks the current Date (to be later used for report)
- Create a Word Document
- reads and replace the table contents of each table with the query results
- Saves the file
- Closes the connection