python - SQLAlchemy bulk insert failing -


I am bulk compositing using a SQLAlchemy in a loop as follows:

  table For batch, pending inert: self.conn.execute (table.insert (), batch)  

Where batch list dict and the table is a SQLAlchemy table before the batch is successfully executed but with the inserting on the same table, the following error fails later in the recurrence Statement error: parameter for parameter parameter 'security_exchange' parameter 45 (original reason: invalidRequestError: parameter value 45 in bind parameter 'security_exchange' is required for a value 45) UNSERT In .........

Here is the security_exchange blank column in DB (PostGraceQL), so it is not mandatory and omitted in all the entries in the batch. I'm confused why this is the first successful for bulk inputs, but fails to put another in the same table. Also for the same table, the number of columns always available for all the names in all batches is the same.

To batch, all the bits in the batch are all set to make the same set of all the objects Items are required. In my case some alternate columns (with the default value) were being dropped for some items in the batch.


Comments

Popular posts from this blog

sqlite3 - UPDATE a table from the SELECT of another one -

c# - Showing a SelectedItem's Property -

javascript - Render HTML after each iteration in loop -