-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
☝🏼Destinations supports destination sync mode #2460
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.
looks good!
i think we need to make sure we write integrations tests for normalization so that we all be in agreement on what exactly the behavior is we expect. this shouldn't be part of the PR, but i'm just pointing it out so it doesn't get forgotten.
airbyte-tests/src/acceptanceTests/java/io/airbyte/test/acceptance/AcceptanceTests.java
Outdated
Show resolved
Hide resolved
airbyte-tests/src/acceptanceTests/java/io/airbyte/test/acceptance/AcceptanceTests.java
Outdated
Show resolved
Hide resolved
airbyte-tests/src/acceptanceTests/java/io/airbyte/test/acceptance/AcceptanceTests.java
Outdated
Show resolved
Hide resolved
LOGGER.info("configured destination sync modes: {}", syncInput.getCatalog().getStreams() | ||
.stream() | ||
.collect(Collectors.toMap(s -> s.getStream().getName(), | ||
s -> s.getDestinationSyncMode() != null ? s.getDestinationSyncMode() : DestinationSyncMode.APPEND))); |
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.
is this assumption safe? it seems like if syncMode is full_refresh and destinationSyncMode is null then we'll end up with destinationSyncMode being set to append. In the case i think the intended configuration is full refresh, but we'll end up with incremental. it seems like for now if destinationSyncMode is empty you need to set using information from sync mode to figure out what it should be? i could be misunderstanding.
maybe you could write a test that shows the mapping of the possible configurations to what you expect them to be so that we can all be on the same page?
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.
Discussed offline and agreed on moving forward with 2 changes:
- we'll be removing the default values of sync modes and raising exceptions if they are not defined...
- I will be providing a Migration Script to make sure destination sync modes are defined when upgrading versions and are keeping the same behavior as before the upgrade
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.
Since they become required I'll start another PR for that change instead.
In the meantime, I can merge this one as it is
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.
PR is here: #2500
...rs/destination-csv/src/main/java/io/airbyte/integrations/destination/csv/CsvDestination.java
Outdated
Show resolved
Hide resolved
...-json/src/main/java/io/airbyte/integrations/destination/local_json/LocalJsonDestination.java
Outdated
Show resolved
Hide resolved
@@ -124,7 +125,7 @@ public long createGetSpecJob(String integrationImage) throws IOException { | |||
} | |||
|
|||
// Strategy: | |||
// 1. Set all streams to full refresh. | |||
// 1. Set all streams to full refresh - overwrite. | |||
// 2. Create a job where the source emits no records. | |||
// 3. Run a sync from the empty source to the destination. This will overwrite all data for each | |||
// stream in the destination. |
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.
Instead of an empty source, could we force a full refresh from source instead?
Talking with @johnlafleur, we feel it would be friendlier to the user and so I created this ticket: #2484
/publish connector=connectors/destination-postgres
|
/publish connector=connectors/destination-bigquery
|
/publish connector=connectors/destination-snowflake
|
/publish connector=connectors/destination-redshift
|
/publish connector=connectors/destination-csv
|
/publish connector=connectors/destination-local-json
|
/publish connector=connectors/destination-meilisearch
|
/publish connector=connectors/destination-bigquery
|
* Make sync modes required * Provide Migration script making sure it is always defined for previous sync configs
Since this PR now introduces destination connectors that require destination sync modes to be defined, I will wait until the PR for the front-end (#2371) is ready before merging this one to master. Otherwise, newly created sync will be failing since the UI won't be setting/defining destination sync modes yet |
What
Describe what the change is solving
Closes #2409
Pre-merge Checklist