Closed mhasan09 closed 4 months ago
Hello @mhasan09 ,
Thank you for raising the issue, we are looking into it, will update.
Regards, Sujan
Hello @mhasan09 ,
We tried to reproduce it with below code snippet, but its not throwing above error, its working fine.
using below versions
import sqlalchemy print(sqlalchemy.version) import snowflake.sqlalchemy print(snowflake.sqlalchemy.version)
1.4.52 1.5.3
`from sqlalchemy import create_engine import pandas as pd
loan_file = "File1.csv" df = pd.read_csv(loan_file, sep=",", header=0, index_col=False)
engine = create_engine(URL( account = 'xxxx', user = 'xxx', password = 'xxx', database = 'SAMPLEDATABASE', schema = 'TEST', warehouse = 'SUJAN_WH', role='xxxx', ))
try: connection = engine.connect() results = connection.execute('select current_version()').fetchone() print(results[0])
with engine.connect() as con:
df.to_sql(name='mycsvtable2', con=con, index=False, if_exists='append')
finally: connection.close() engine.dispose()`
Its writing to table perfectly
Regards, Sujan
Hello @mhasan09 ,
There was no response and the issue is not getting reproduced, closing it. Feel free to reopen when reproduced and provide us the required artifacts.
Regards, Sujan
Python version
3.10.7
Operating system and processor architecture
windows 11
Installed packages
What did you do?
What did you expect to see?
Expected the example to work, but got