-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
implement column filtering in the replication workflow #20369
Conversation
There was a problem hiding this 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?
airbyte-commons-worker/src/main/java/io/airbyte/workers/general/DefaultReplicationWorker.java
Outdated
Show resolved
Hide resolved
@@ -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, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: final
airbyte-commons-worker/src/main/java/io/airbyte/workers/general/DefaultReplicationWorker.java
Outdated
Show resolved
Hide resolved
airbyte-commons-worker/src/main/java/io/airbyte/workers/general/DefaultReplicationWorker.java
Outdated
Show resolved
Hide resolved
airbyte-commons-worker/src/main/java/io/airbyte/workers/general/DefaultReplicationWorker.java
Outdated
Show resolved
Hide resolved
airbyte-commons-worker/src/main/java/io/airbyte/workers/general/DefaultReplicationWorker.java
Show resolved
Hide resolved
airbyte-commons-worker/src/main/java/io/airbyte/workers/general/DefaultReplicationWorker.java
Show resolved
Hide resolved
airbyte-commons/src/main/java/io/airbyte/commons/features/EnvVariableFeatureFlags.java
Outdated
Show resolved
Hide resolved
@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. |
airbyte-commons-worker/src/main/java/io/airbyte/workers/general/DefaultReplicationWorker.java
Show resolved
Hide resolved
There was a problem hiding this 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!
airbyte-commons-worker/src/main/java/io/airbyte/workers/general/DefaultReplicationWorker.java
Outdated
Show resolved
Hide resolved
@@ -334,6 +336,68 @@ void testOnlyStateAndRecordMessagesDeliveredToDestination() throws Exception { | |||
verify(destination, never()).accept(TRACE_MESSAGE); | |||
} | |||
|
|||
@Test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice tests!
There was a problem hiding this 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.
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
airbyte-commons-worker/src/main/java/io/airbyte/workers/general/DefaultReplicationWorker.java