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

support reading from multiple tables using logical replication slots #113

Merged
merged 10 commits into from
Jan 18, 2024

Conversation

maha-hajja
Copy link
Contributor

@maha-hajja maha-hajja commented Dec 18, 2023

Description

support reading from multiple tables using logical replication slots.

changes to params:

  • "columns" param is removed.
  • "key" param is updates now to accept multiple tables and keys, as a list of pairs, example: "table1:key1,table2:key2", if the key is not provided, we'll fetch the table's primary key.

Fixes #23

Quick checks:

  • I have followed the Code Guidelines.
  • There is no other pull request for the same update/change.
  • I have written unit tests.
  • I have made sure that the PR is of reasonable size and can be easily reviewed.

@maha-hajja maha-hajja requested a review from a team as a code owner December 18, 2023 19:07
Copy link
Member

@lovromazgon lovromazgon left a comment

Choose a reason for hiding this comment

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

LGTM, there's a few followups we need to do, as you already pointed out in comments. I'll collect them here:

  • update the snapshot iterator to fetch data from multiple tables
  • remove key and column config fields
  • think about actually having a key field that accepts comma separated table:column pairs
  • later on introduce a Conduit-wide convention for specifying the source table/topic/collection that can be used for routing in destination connectors and add the metadata field instead of (or in addition to?) the postgres.table metadata field

I think at least the first three would be needed to make this feature complete so we can cut a release.

source/paramgen.go Outdated Show resolved Hide resolved
source/logrepl/cdc.go Show resolved Hide resolved
source/config.go Outdated Show resolved Hide resolved
source/logrepl/cdc.go Outdated Show resolved Hide resolved
source/logrepl/cdc.go Outdated Show resolved Hide resolved
source/logrepl/cdc.go Outdated Show resolved Hide resolved
source/logrepl/handler.go Outdated Show resolved Hide resolved
source.go Outdated Show resolved Hide resolved
source.go Outdated Show resolved Hide resolved
source.go Outdated Show resolved Hide resolved
source.go Outdated Show resolved Hide resolved
source.go Show resolved Hide resolved
Copy link
Member

@lovromazgon lovromazgon left a comment

Choose a reason for hiding this comment

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

One last thing.

source/config_test.go Outdated Show resolved Hide resolved
source.go Outdated Show resolved Hide resolved
source/config_test.go Show resolved Hide resolved
@maha-hajja maha-hajja merged commit 05c6c83 into main Jan 18, 2024
2 checks passed
@maha-hajja maha-hajja deleted the maha/multiple-tables branch January 18, 2024 19:03
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.

Feature: Support multiple tables
2 participants