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

implement column filtering in the replication workflow #20369

Merged
merged 6 commits into from
Dec 13, 2022

Conversation

mfsiega-airbyte
Copy link
Contributor

@mfsiega-airbyte mfsiega-airbyte commented Dec 12, 2022

What

Implement column selection in the replication workflow.

It is behind a feature flag, default disabled.

How

If field selection is enabled, only retain the fields in the message from the source that are explicitly included in the catalog.

Recommended reading order

  1. airbyte-commons-worker/src/main/java/io/airbyte/workers/general/DefaultReplicationWorker.java
  2. Everything else.

@octavia-squidington-iv octavia-squidington-iv added area/platform issues related to the platform area/worker Related to worker labels Dec 12, 2022
Copy link
Contributor

@pmossman pmossman left a comment

Choose a reason for hiding this comment

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

@mfsiega-airbyte high level approach looks solid to me! I left some comments. Let me know when you've added tests and I can do another review with an explicit approval. Also, were you planning on adding an Acceptance Test in this PR as well?

@@ -279,18 +287,24 @@ private static Runnable readFromDstRunnable(final AirbyteDestination destination
@SuppressWarnings("PMD.AvoidInstanceofChecksInCatchClause")
private static Runnable readFromSrcAndWriteToDstRunnable(final AirbyteSource source,
final AirbyteDestination destination,
ConfiguredAirbyteCatalog catalog,
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: final

@mfsiega-airbyte mfsiega-airbyte temporarily deployed to more-secrets December 12, 2022 21:40 — with GitHub Actions Inactive
@mfsiega-airbyte mfsiega-airbyte temporarily deployed to more-secrets December 12, 2022 21:40 — with GitHub Actions Inactive
@mfsiega-airbyte mfsiega-airbyte temporarily deployed to more-secrets December 12, 2022 22:17 — with GitHub Actions Inactive
@mfsiega-airbyte mfsiega-airbyte temporarily deployed to more-secrets December 12, 2022 22:17 — with GitHub Actions Inactive
@mfsiega-airbyte mfsiega-airbyte temporarily deployed to more-secrets December 12, 2022 22:22 — with GitHub Actions Inactive
@mfsiega-airbyte mfsiega-airbyte temporarily deployed to more-secrets December 12, 2022 22:22 — with GitHub Actions Inactive
@mfsiega-airbyte mfsiega-airbyte temporarily deployed to more-secrets December 12, 2022 22:31 — with GitHub Actions Inactive
@mfsiega-airbyte mfsiega-airbyte temporarily deployed to more-secrets December 12, 2022 22:31 — with GitHub Actions Inactive
@mfsiega-airbyte
Copy link
Contributor Author

@pmossman I think this should be ready for review, marked it as such! The acceptance test passes locally; if I have issues getting it to pass in CI I'd say go ahead without it in this PR (since the feature is disabled by default) and I can work it out after.

@mfsiega-airbyte mfsiega-airbyte marked this pull request as ready for review December 12, 2022 22:40
@mfsiega-airbyte mfsiega-airbyte requested a review from a team as a code owner December 12, 2022 22:40
Copy link
Contributor

@pmossman pmossman left a comment

Choose a reason for hiding this comment

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

Looks great! Left a couple tiny suggestions for comments/error message but looks mergeable to me!

@@ -334,6 +336,68 @@ void testOnlyStateAndRecordMessagesDeliveredToDestination() throws Exception {
verify(destination, never()).accept(TRACE_MESSAGE);
}

@Test
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice tests!

Copy link
Contributor

@benmoriceau benmoriceau left a comment

Choose a reason for hiding this comment

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

LGTM for adding the feature flag.

@mfsiega-airbyte mfsiega-airbyte temporarily deployed to more-secrets December 12, 2022 23:22 — with GitHub Actions Inactive
@mfsiega-airbyte mfsiega-airbyte temporarily deployed to more-secrets December 12, 2022 23:23 — with GitHub Actions Inactive
@mfsiega-airbyte mfsiega-airbyte merged commit 0fac8c8 into master Dec 13, 2022
@mfsiega-airbyte mfsiega-airbyte deleted the msiega/column-selection-replication-workflow branch December 13, 2022 00:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/platform issues related to the platform area/worker Related to worker
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants