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

Creating temp dbs #99

Merged
merged 4 commits into from
Mar 26, 2024
Merged

Creating temp dbs #99

merged 4 commits into from
Mar 26, 2024

Conversation

wendy-aw
Copy link
Contributor

Made changes to eval.py to accommodate creation of temporary postgres databases not found in the standard 7 dbs of defog-data.

There is now an option to create (and drop) temporary DBs if the db_name contains the suffix "_temp". The table_metadata_string col containing the DDL statements for this temp DB must also be provided in the same data/your_custom_qns.csv file. Note that it's important that the DDL statements contain the insertion of VALUES so that we can evaluate on non-empty dataframes.

Additional note: to prevent race conditions during creation and dropping your temporary databases, it's best to give each question a unique db_name like temp_db_name = db_name + question + "_temp" or temp_db_name = db_name + row_index + "_temp"

@wendy-aw wendy-aw requested a review from wongjingping March 26, 2024 05:32
Copy link
Collaborator

@wongjingping wongjingping left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

passed on my end, thanks!

@wongjingping wongjingping merged commit 313725e into main Mar 26, 2024
2 checks passed
@wongjingping wongjingping deleted the wendy/temp_dbs branch March 26, 2024 07:30
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.

2 participants