Closed victorterpstra closed 1 year ago
Seems in one instance this problem is caused to the fact that the 'NaN' value is a string column with values 'nan'. SQLite worked fine, even the row-by-row insert into DB2 Cloud worded correctly, i.e. the resulting value in the DB table was a NULL. However, the df.to_sql() fails. Added a fix in ScebarioDbTable to convert string 'nan' to None.
Fixed in v0.5.4.6b0
DB2-Cloud foreign-keys seems to not allow nan values in Pandas DataFrames. For example, we have a string
productGroupName
that can be nan. SQLite has no problem. Note that the Column does not specifynullable
, which defaults toTrue
.TODO: Find out how to properly set in combination with DB2 Cloud.
Work-around: