I am trying to write out a sample table to Microsoft SQL Server Management Studio. I am able to write out to SSMS from python. Here is my code. I cannot include the information in the connection, but it works for reading in information from SSMS. I get the error below. Necessary imports are pandas, sqlalchemy, pyodbc,
df2 = pd.DataFrame({'key':['a','a','b'],
'val':[435,7,6]})
cnxn = pyodbc.connection() # Have the correct connection here but can't include
cn= create_engine(cnxn)
rows_uploaded= df2.to_sql(OUTPUT_TABLE_NAME, cn, schema = 'sample_schema', if_exists = 'replace', index = False, chunksize = 1000)
AttributeError: 'pyodbc.Connection' object has no attribute '_instantiate_plugins'