Skip to content

[#240] Dev Issue: Update Docker compose #241

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

Conversation

sahilds1
Copy link
Collaborator

@sahilds1 sahilds1 commented Apr 8, 2025

The goal of this PR is to be able to query the Balancer application database from a Jupyter notebook per #240

from sqlalchemy import create_engine
import pandas as pd

engine = create_engine("postgresql+psycopg2://balancer:balancer@localhost:5433/balancer_dev")

# TODO: Delete papers that shouldn't be used from local database
query = "SELECT * FROM api_embeddings WHERE date_of_upload > '2025-03-14';"

df = pd.read_sql(query, engine)

@sahilds1 sahilds1 marked this pull request as ready for review April 8, 2025 21:16
@@ -10,7 +10,7 @@ services:
- POSTGRES_PASSWORD=balancer
- POSTGRES_DB=balancer_dev
ports:
- "5432:5432"
- "5433:5432"
Copy link
Collaborator Author

@sahilds1 sahilds1 Apr 8, 2025

Choose a reason for hiding this comment

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

@taichan03 Did we have to change the host port from 5432 to 5433 because the host port 5432 was already being used by another service?

@taichan03 taichan03 merged commit c7253f1 into CodeForPhilly:listOfMed Apr 15, 2025
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