I have 2 tables, let's say MAIN (Redshift) and TEMP (Spectrum), and a simple query that inserts all the data from TEMP into MAIN. But sometimes it may fail and rise an error like this:error: Invalid exponent, Value 'e', Pos 5, Type: Decimal.
Handling this error is not a problem what I want is not to terminate the transaction because of one row. Is there a way to skip the row where an error arises? For example, iterate over the data row by row and if there is no error then insert. Will this kind of solution slow down the insertion significantly?
I found similar question but it is 13 years old so maybe something has changed since then.