I'm using Python 3.7, I'm not very familiar with SQL with Python, I have the code below to create a SQL engine:
mysql_engine = sqlalchemy.create_engine('mysql://xxxxxx')
Then I have a pre-defined SQL query, here's a simplified version: (this query I have tested in MySQL Workbench and it works fine)
example_query = '''
select
a.date
from
abc.xyz a
'''
I want to be able to read/query from the table, I tried:
cursor = mysql_engine.cursor()
cursor.execute(example_query)
but I got error AttributeError: 'Engine' object has no attribute 'cursor', perhaps I can use pandas? Can someone help with this, thanks.