Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

invalid_records_* doesn't ignore psycopg2 encoding errors #231

Open
seajhawk opened this issue Jan 29, 2023 · 1 comment
Open

invalid_records_* doesn't ignore psycopg2 encoding errors #231

seajhawk opened this issue Jan 29, 2023 · 1 comment

Comments

@seajhawk
Copy link

I'm getting the following error:
target_postgres.exceptions.PostgresError: ('Exception writing records', QueryCanceled("COPY from stdin failed: error in .read() call: UnicodeEncodeError 'utf-8' codec can't encode character '\\udc81' in position 184: surrogates not allowed\nCONTEXT: COPY tmp_b02cfd05_c98b_477c_950e_cb03ed693bab, line 23990\n")) cmd_type=elb consumer=True name=target-postgres producer=False stdio=stderr string_id=target-postgres

I was hoping that the invalid_records_* settings would help with this kind of problem, but that doesn't seem to be the case.

Is it supposed to help?

If not, do you have any suggestions for avoiding this kind of problem?

@laurentS
Copy link
Collaborator

This looks like postgres itself is rejecting your data because it contains an invalid character \\udc81. I don't think the target's validation checks cover this type of issue, which might be why they don't seem to help.
Maybe check your data source and the tap to validate that you're not sending invalid data over?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants