Hey.
I have this problem where I want the AI agent to create a trainingschema for me, and then store it to Microsoft SQL. But I can’t get the agent to save it correctly in the SQL file.
The insert Microsoft SQL node gives the following error in the picture. When I let the AI agent make a schema and save it, it will say it did so succesfully, but the file ends up empty.
It appears the data which was attempted to be written to the table had null (or didn’t have a value) for the column datum, which is not allowed to be empty by the table schema.
Absolutely, this is totally fine, just make sure that when AI does call all the values marked as NOT NULL in the schema are provided. Otherwise the DB will reject that insert you will get an error like you showed.
Well I want the AI to be able to insert rows like this into the Microsoft SQL file. But the SQL database starts off as an empty table with just column names. I’m not sure what you meant with NOT NULL values in the schema
When I do let the AI generate a schema and try to make him save it into an SQL database, It seems like the AI wants to put all the activities of a day into one cell.
you previously shared a screenshot where the error was Cannot insert value NULL into column 'datum'. This error means that the attempted insert had no value for the column that doesn’t accept that in its schema definition. Meaning that when the table was created it was created with a “contract” that all rows will necessarily have a value for this column. The insert attempted in the screenshot above (initial message) violated that “contract”.
If it wants to pull all activities in a single cell, that means your prompt is not well structured and doesn’t instruct the agent how to use the tool properly.