I have Netezza database at remote server and i am trying to write to the database using Pyodbc.
The connection work's while reading from the database..However while trying to write i am not able to write to the Netezza database. It shows the following error:
"Error: ('HY000', '[HY000] ERROR: Column 4 : Field cannot contain null values (46) (SQLExecDirectW)')"
On further inspecting the Column 4, i found no Null value in the specified problem.
Also, the snippet of the code which i am using to write to the database is as follows:
for row in Full_Text_All.itertuples():
srows = str(row[1:]).strip("()")
query2 = "insert into MERGED_SOURCES values('+srows+')"
where, Full_Text_All is the name of the dataframe MERGED_SOURCES is the name of the table.