I have a use case implementation for which I am trying to identify the solution, the implementation is as follows :
- User defines the SQL server connection parameters like DATABASE_TYPE ( like MySQL, pgsql, sqlite or any db supported by SQLAlchemy), HOST, PORT, SCHEMA_NAME, USER_NAME and PASSWORD
- User then does the TEST CONNECTION to validate the connection parameters provided, and provides SUCCESS and FAILURE feedback
- On SUCCESS, user will type in the sql query ( following SQLAlchemy's SQL Expression Language more details here ) the which needs to be executed.
If you notice above all the parameters for SQLAlchemy to work are user defined at run time, I am trying to implement the function in python which consumes the above connection parameters and sql query, executes the query on successful connection and returns the query result. Any point of direction or help on this would be great.
Thanks
>>>Python prompt? If everything is simply access to SQLAlchemy, why write any additional code?