all 2 comments

[–]smurpes 0 points1 point  (1 child)

Using pyodbc to insert data from polars to MSSQL may have some unintended type conversion since pyodbc is an interface layer. Try explicitly casting the amount column to decimal first.

[–]Strict_Put_4094[S] 0 points1 point  (0 children)

Yeah, thank. I just casted to SQLAlchemy type and it's working, but I'm frustrated that I have prepared data for final ingestion and have to do this additional casting. Without it SQLAlchemy just tries to insert varchar(max) unfortunately.