I've got some Connection class which has __enter__ and __exit__ methods to return mysql.connector.MySQLConnection instance.
What is required is to run mysql stored procedure and get data as dataframe. I've tried tons of ways using: ?, %s, :1, %(name)s and passing list, tuple, dict into parameters.
with Connection(**self._connection) as conn:
df = pandas.read_sql("call stored_procedure (?);", conn, params=['test'])
I read Pandas read_sql with parameters, MySQL Stored Procedures, Pandas, and "Use multi=True when executing multiple statements" and few others and still can't find a solution as it always failed with "Not all parameters were used in the SQL statement" or asks to use Multi = True;
Of course we can read data with cursor, fetch it and pass into DataFrame constructor, but there has to be a way of using pandas.read_sql according to documentation.