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

fix: use psycopg text array decoding in wal2json messages #490

Merged
merged 2 commits into from
Aug 28, 2024

Conversation

hudovisk
Copy link
Contributor

@hudovisk hudovisk commented Aug 27, 2024

Slack thread: https://meltano.slack.com/archives/C06A1MD6A6L/p1724619858505739

When using log based replication, the wal2json output for columns of array types returns a string encoded in sql format.
Ex: '{a,b}'

The records produced by the tap in this sutation fails the target schema validation, since the schema is of type array and the value is a string.

I included a test case for it. Please feel free to modify the PR, I am by no means a python developer.

Related:

Copy link
Member

@edgarrmondragon edgarrmondragon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very minor nits, otherwise LGTM!

tap_postgres/client.py Outdated Show resolved Hide resolved
tap_postgres/client.py Outdated Show resolved Hide resolved
tap_postgres/client.py Show resolved Hide resolved
@edgarrmondragon edgarrmondragon self-assigned this Aug 28, 2024
@edgarrmondragon
Copy link
Member

Thanks @hudovisk!

@edgarrmondragon edgarrmondragon merged commit c68b98c into MeltanoLabs:main Aug 28, 2024
7 checks passed
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

Successfully merging this pull request may close these issues.

2 participants