-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathload_data.sql
More file actions
15 lines (14 loc) · 885 Bytes
/
Copy pathload_data.sql
File metadata and controls
15 lines (14 loc) · 885 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
-- ============================================================================
-- Load the generated CSVs into Supabase/Postgres.
--
-- Run schema.sql FIRST. Then either:
-- (a) Use the Supabase Table Editor's "Import data from CSV" button per
-- table (easiest, no local psql needed), or
-- (b) Run this file with psql if you have direct DB access:
-- psql "$DATABASE_URL" -f sql/load_data.sql
-- (run from the repo root so the relative paths resolve)
-- ============================================================================
\copy product_master from 'data/product_master.csv' with (format csv, header true);
\copy store_master from 'data/store_master.csv' with (format csv, header true);
\copy sales_promotions from 'data/sales_promotions.csv' with (format csv, header true);
\copy inventory from 'data/inventory.csv' with (format csv, header true);