pd_to_mssql error: Cannot bulk load because the file "mysql.csv" could not be opened
The function pd_to_mssql uses BULK INSERT which requires the target file to exist on the same instance as the SQL Server. If you're running Python code on a remote machine, like your own computer, then pd_to_mssql will return the error, "Cannot bulk load because the file "mysql.csv" could not be opened". I'm hopeful you can find a workaround for this but I imagine you'll have to change your approach.
Hello guys, do you have any idea on how to solve this?
In my case it doesn't work if I run the code on the server either.
File "src\pymssql.pyx", line 468, in pymssql.Cursor.execute sqlalchemy.exc.OperationalError: (pymssql.OperationalError) (4860, b'Cannot bulk load. The file "mysql.csv" does not exist.DB-Lib error message 20018, severity 16:\nGeneral SQL Server error: Check messages from the SQL Server\n') [SQL: BULK INSERT stripe_import FROM 'mysql.csv';]
it doesn't work for me also:
sqlalchemy.exc.OperationalError: (pymssql.OperationalError) (4860, b'Cannot bulk load. The file "mysql.csv" does not exist.DB-Lib error message 20018, severity 16:\nGeneral SQL Server error: Check messages from the SQL Server\n') [SQL: BULK INSERT ob FROM 'mysql.csv';]
I was hoping to use this for MSSQL. I guess I will avoid it.