Hodor database schema (reference)#
Purpose: Stable notes for the prospect/contact SQL backend used by HodorDatabase. For connector behavior and modes, see connections/hodor.html.
Discovery: Run from the repo root (credentials in .env) to print live table/column metadata and env-var hints:
bash
python scripts/discover_hodor_schema.pyTypical deployment (CBI_MACH / dbo.pros)#
The pipeline is often pointed at CBI_MACH with the dbo.pros contact table. Names and tables are overridable via settings in config.py (e.g. HODOR_CONTACT_TABLE, HODOR_ID_COLUMN, HODOR_EMAIL_COLUMN, and related HODOR_* fields).
| Topic | Detail |
|---|---|
| Primary key | Integer prospect id (e.g. pros-num) — column name configurable |
| Common columns | Email, name, firm, title, location, phone, active/inactive flags — exact names via HODOR_*_COLUMN |
| Library / list codes | Usually from dbo.src (prospect id + source + library code), not from a column on pros alone |
| Global suppressions | Optional: dbo.CBITBL_GlobalUnsubscribes (email list) when used in your environment |
Treat row counts, server hostnames, and non-public identifiers as environment-specific; do not commit secrets or production-only dumps into this file.
Configuration surface#
- Connection:
HODOR_CONNECTION_STRINGorHODOR_DB_HOST/HODOR_DB_DATABASE/HODOR_DB_USER/HODOR_DB_PASSWORD/HODOR_DB_PORT. - Schema mapping:
HODOR_CONTACT_TABLE,HODOR_ID_COLUMN,HODOR_EMAIL_COLUMN, and otherHODOR_*column settings inconfig.py. - Writes:
HODOR_AUTOMATIC_UPDATES— whenfalse, mutating calls are skipped at the action-engine layer and intended changes are emailed (seeconnections/hodor.html). Whentrueand writes are enabled, INACTIVE handling combines Prospect Import rows with the AutoRenewal email-based update (IsNoLongerWithFirm = 1,LastUpdatedDate = getdate(),UpdatedReason = 'Updated based on AutoRenewal Program'). Under the Active-only policy, Hodor email / title updates are additionally gated on an active CUPOLA row; OUT_OF_OFFICE determinations skip Hodor entirely.
Related#
connections/hodor.html— reads, writes, read-only / dry-run / manual-update modesSERVICE_STATUS_TRACKER.html— service matrix by operating modeAGENTS.html— short-lived workspace notes (may duplicate facts above)