feat: initial scaffold for Rock Cosmetics Adit ingestion (#1784)
- pyproject.toml with rock-ingest CLI entrypoint - config, db, ingest, migrate modules mirroring agency-marketing-ingest patterns - column_map.py with stubbed COLUMN_MAP — fill once Adit CSV export lands - 3 SQL migrations: schema bootstrap, imports tracking, leads table with GHL match_status - drop/ directory for Adit export files (CSV first, xlsx fallback) - GHL_CLINIC_NUM TBD pending Sir Alex Therrien confirmation
This commit is contained in:
commit
d63cfe81c6
14 changed files with 799 additions and 0 deletions
46
src/rock_cosmetics_ingest/column_map.py
Normal file
46
src/rock_cosmetics_ingest/column_map.py
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
"""
|
||||
Adit export column mapping for Rock Cosmetics (#1784).
|
||||
|
||||
Fill in source-header keys (commented placeholders) once the Adit CSV export
|
||||
lands via Sir Alex Therrien (info@lionsalesfunnels.com on app.adit.com).
|
||||
Export preference: CSV > xls/xlsx > PDF (last resort).
|
||||
Contact: Judy Tran / advperio28@gmail.com (signs as Judy Smith).
|
||||
|
||||
Target field names are standardised to match the APID Attribution Dashboard schema.
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
# ── Adit export → internal field mapping ─────────────────────────────────────
|
||||
# Keys = exact column header strings from the Adit CSV/XLSX export.
|
||||
# Values = internal field names used throughout this pipeline.
|
||||
# Fill once the export sample is available.
|
||||
COLUMN_MAP: dict[str, str] = {
|
||||
# --- Patient identity (required for GHL name + DOB matching) ---
|
||||
# "<Adit header>": "first_name",
|
||||
# "<Adit header>": "last_name",
|
||||
# "<Adit header>": "dob", # format TBD — MM/DD/YYYY likely
|
||||
|
||||
# --- Appointment / lead data ---
|
||||
# "<Adit header>": "appointment_date",
|
||||
# "<Adit header>": "appointment_status", # scheduled / completed / cancelled
|
||||
# "<Adit header>": "procedure_type",
|
||||
# "<Adit header>": "lead_source", # referral channel from Adit
|
||||
|
||||
# --- Campaign / attribution ---
|
||||
# "<Adit header>": "campaign",
|
||||
# "<Adit header>": "report_date",
|
||||
|
||||
# --- Performance metrics (include if present in Adit export) ---
|
||||
# "<Adit header>": "impressions",
|
||||
# "<Adit header>": "clicks",
|
||||
# "<Adit header>": "cost_usd",
|
||||
# "<Adit header>": "conversions",
|
||||
# "<Adit header>": "ctr",
|
||||
# "<Adit header>": "avg_cpc_usd",
|
||||
}
|
||||
|
||||
# ── Field type sets used by ingest.py coercion ────────────────────────────────
|
||||
DATE_FIELDS: frozenset[str] = frozenset({"dob", "report_date", "appointment_date"})
|
||||
INT_FIELDS: frozenset[str] = frozenset({"impressions", "clicks", "conversions"})
|
||||
DECIMAL_FIELDS: frozenset[str] = frozenset({"cost_usd", "avg_cpc_usd", "ctr"})
|
||||
Loading…
Add table
Add a link
Reference in a new issue