Repository navigation
fix(files): name the fixes when two files of a folder hold one replace_key value - #334
Merged
Merged
Conversation
…e_key value The error now says what to do in each case: put a value's rows in one file when the files are parts of one export, or, when a newer file restates an older one, take the older file out of the folder by hand or with after_load.
…t that it clears one A failed load moves nothing, so the older file must be removed by hand; after_load keeps a later file from meeting it again.
Deploying sqlload with
|
| Latest commit: |
b14d692
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://5a81e072.sqlload.pages.dev |
| Branch Preview URL: | https://files-overlap-error.sqlload.pages.dev |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When two files in a
delete_insertfolder hold the samereplace_keyvalue, the load stops, because each file replaces the rows of the values it holds and loading both would keep only the last one. The error said that, but the fix it gave ("remove whichever file is outdated") left users guessing which case they were in.The error now names the fix for each case:
after_load = { move_to = ... }(or"delete") so that each file leaves the folder once it loads, and a file sent later replaces its values instead of meeting this error.A failed load moves nothing, so
after_loadcan't clear this error itself. It only prevents a repeat. Both versions of the error say so: the one raised when two files in one run overlap, and the one raised when a file overlaps rows an earlier run loaded from a file still in the folder.The files source page explains the two cases the same way.
Verification
given_le_files_when_delete_insert_replaces_by_replace_key_then_each_version_holds_the_rows_of_its_newest_file) asserts both full messages. It failed on the old wording and passes now.