Spaces:
Sleeping
Sleeping
Commit History
-
Swap Supabase for DuckDB-in-repo
Palani-UnisonPipelines now write to a single DuckDB file at data/eqdp.duckdb committed to the repo. Streamlit Cloud reads it directly — no managed database, no secrets, no auth. Mechanics: - src/store.py: DuckStore with a supabase-py-compatible chainable API (table().upsert/insert/update/select.eq/gte/lte/order/range/limit.execute, count="exact" supported). Every pipeline call site keeps working unchanged. - src/db.py: get_supabase() now returns the DuckStore. get_pg_conn() returns a raw DuckDB connection. - streamlit_app/lib/store.py: read-only DuckDB reader. lib/supabase.py removed; every page import flipped to lib.store. - db/schema_duckdb.sql: DuckDB-compatible schema. Drops auth.users, user_profiles, engagement_events, RLS, and the generated dollar_volume column (computed in pipelines instead). - scripts/init_duckdb.py: idempotent schema apply. - requirements.txt: drops supabase + psycopg2-binary. - .gitignore: whitelists data/eqdp.duckdb (the rest of data/ is still developer-lo…aa3be69