Spaces:
Sleeping
Sleeping
Commit History
-
Backfill the DuckDB + harden the shim
Palani-Unison- pipelines.backfill ran 2020-01-01 → 2026-05-01 against the new DuckStore: 72 tickers, 9 managers, 109,526 prices_daily rows, 0 fetch failures. data/eqdp.duckdb is now 14.7 MB. - src/store.py: _Insert.execute now appends RETURNING * and collects the server-generated rows so callers can read default-populated columns (e.g. pipeline_runs.run_id from a UUID default). - db/schema_duckdb.sql: pipeline_runs.run_id gains DEFAULT uuid(). - Verified end-to-end: streamlit_app/lib/store loaders return populated data when the pipeline is not holding the writer lock.4c2c44d -
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