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

fix: guard against accidental deletes with ndjson output format #281

Merged
merged 1 commit into from
Oct 10, 2023

Conversation

mikix
Copy link
Contributor

@mikix mikix commented Oct 10, 2023

The ndjson output formatter deletes all existing content in its target directory, because it is not an incremental formatter.

But this introduces the possibility of accidentally using the ndjson output format on a delta lake folder or some other important folder.

So this commit checks the contents of the target output dir and errors out if there are odd looking files in there.

This fixes #280

Checklist

  • Consider if documentation (like in docs/) needs to be updated
  • Consider if tests should be added

The ndjson output formatter deletes all existing content in its target
directory, because it is not an incremental formatter.

But this introduces the possibility of accidentally using the ndjson
output format on a delta lake folder or some other important folder.

So this commit checks the contents of the target output dir and errors
out if there are odd looking files in there.
@mikix mikix marked this pull request as ready for review October 10, 2023 19:44
@mikix mikix merged commit 494998f into main Oct 10, 2023
2 checks passed
@mikix mikix deleted the mikix/ndjson-safety branch October 10, 2023 19:51
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.

Warn user if ETL output data of a different format is in target directory
2 participants