fix: Update all notebooks to load .env for database credentials
Some checks failed
CI / lint-and-test (push) Has been cancelled

All 15 notebooks now use load_dotenv('../../.env') instead of
hardcoded fallback credentials.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-18 22:31:07 -05:00
parent c3de98c4a5
commit 28f239e8cd
14 changed files with 79 additions and 54 deletions

View File

@@ -19,7 +19,7 @@
"\n",
"| Table | Grain | Key Columns |\n",
"|-------|-------|-------------|\n",
"| `mart_neighbourhood_amenities` | neighbourhood × year | transit_per_1000, transit_index, transit_count |\n",
"| `mart_neighbourhood_amenities` | neighbourhood \u00d7 year | transit_per_1000, transit_index, transit_count |\n",
"\n",
"### SQL Query"
]
@@ -32,9 +32,13 @@
"source": [
"import pandas as pd\n",
"from sqlalchemy import create_engine\n",
"from dotenv import load_dotenv\n",
"import os\n",
"\n",
"engine = create_engine(os.environ.get('DATABASE_URL', 'postgresql://portfolio:portfolio@localhost:5432/portfolio'))\n",
"# Load .env from project root\n",
"load_dotenv('../../.env')\n",
"\n",
"engine = create_engine(os.environ.get('DATABASE_URL'))\n",
"\n",
"query = \"\"\"\n",
"SELECT\n",