Hi, I am using the Upload Component from Dash to upload Microsoft Access files but I’m not sure how to acces them afterwards.
I have already seen the example in:
https://dash.plot.ly/dash-core-components/upload
But the pandas.read_sql function is a bit different from the ones used do read an Excel or CSV file.
I’m trying to make an sql query with pandas.read_sql using pyodbc to connect to the ms acees file first. I would normally do something like this:
import pyodbc
path = ‘C:/some/random/path/file.mdb’
odbc_conn_str = ‘DRIVER={Microsoft Access Driver (*.mdb)};DBQ=%s’ % path
conn = pyodbc.connect(odbc_conn_str)
#just an example of a normal query
query = “”“SELECT * FROM [Test]”""
df = pd.read_sql(query, conn)
My question is: Which path should I provide to the conn variable in order to create a succesfull connection with the ms access file that is contained in the contents variable from the Upload Component.
Thank you in advanced, I’ll be waiting for your answer.
Kind Regards,
Catalina