target-postgres icon indicating copy to clipboard operation
target-postgres copied to clipboard

Improve message on writing invalid records

Open laurentS opened this issue 1 year ago • 0 comments

If the upstream tap changes schema, for instance if the key properties are modified, the target will fail with a confusing message such as:

target_postgres.exceptions.PostgresError: ('Exception writing records', PostgresError("`key_properties` change detected. Existing values are: ['user_id', 'repo', 'org']. Streamed values are: ['user_id', 'repo_id']"))

In many cases, it is very hard to locate the stream that is causing problem, so that remedial action is difficult at best.

This PR simply adds a bit of info to the message to make it easier to fix the problem.

laurentS avatar Jan 05 '23 11:01 laurentS