Skip to content

Conversation

incogbyte
Copy link

Updated the export_sql_users function to prevent duplicate emails from being written into the export file.

Previously, the function was overwriting the file and writing all the emails fetched from the database, regardless of whether they already existed in the file.

The function now checks if the file exists, reads all existing emails into a set, and only writes emails that do not already exist in the file. The file is now opened in append mode to preserve existing emails.

This change optimizes the export process and avoids unnecessary duplication of data, i think 📦

Updated the export_sql_users function to prevent duplicate emails from being written into the export file. 

Previously, the function was overwriting the file and writing all the emails fetched from the database, regardless of whether they already existed in the file. 

The function now checks if the file exists, reads all existing emails into a set, and only writes emails that do not already exist in the file. The file is now opened in append mode to preserve existing emails. 

This change optimizes the export process and avoids unnecessary duplication of data, i think 📦
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.

1 participant