Load CleanJobData job listings into Supabase for powerful search and real-time subscriptions.
Create a PostgreSQL table matching CleanJobData's schema.
CREATE TABLE jobs (
id BIGINT PRIMARY KEY, title TEXT NOT NULL,
company TEXT, location TEXT, salary_min NUMERIC,
description TEXT, posted_at TIMESTAMPTZ
);Create a function that fetches from CleanJobData and upserts into Supabase.
Set up PostgreSQL full-text search on your synced job data.
ALTER TABLE jobs ADD COLUMN search_vector TSVECTOR
GENERATED ALWAYS AS (to_tsvector('english', title || ' ' || description)) STORED;
CREATE INDEX jobs_search_idx ON jobs USING GIN(search_vector);Yes — it's a natural place to run the sync: fetch from CleanJobData with `fetch()`, transform the response into your table's shape, and upsert into Postgres with the service role key. Trigger it on a `pg_cron` schedule (Supabase's built-in cron extension) so it runs without an external scheduler.
Run a scheduled job — an Edge Function on `pg_cron`, or any cron worker — that calls `/jobs` with `created_max_age` set to your run interval (`created_max_age=1h` for an hourly job) and upserts the results by `id`. `created_max_age` filters on when CleanJobData ingested the listing, not when the employer posted it, so it reliably catches jobs regardless of publish-date backfills. Don't reuse a pagination cursor across separate scheduled runs — a cursor only walks forward through one result set and has no meaning against a fresh query.