Export tables from BigQuery, recreate schema in ParadeDB, and load data with COPY or \\copy for a seamless move.
ParadeDB gives you full-text and vector search on top of PostgreSQL, keeps costs predictable, and lets engineers use familiar SQL instead of BigQuery’s dialect.
Install bq
, gsutil
, psql
, and ensure ParadeDB (PostgreSQL ≥15) is running. Grant BigQuery export permissions and create a GCS bucket.
Run bq extract --destination_format=CSV project:dataset.Customers gs://my-bucket/customers.csv
. Repeat for Orders, Products, and OrderItems.BigQuery writes compressed CSVs with headers.
Use gsutil cp gs://my-bucket/*.csv /data/exports/
. Store files where the ParadeDB host can access them.
Translate BigQuery types to PostgreSQL. Example: STRING → TEXT
, NUMERIC → NUMERIC
, TIMESTAMP → TIMESTAMPTZ
.Create tables with primary keys and indexes.
CREATE TABLE customers
(id INT PRIMARY KEY,
name TEXT,
email TEXT UNIQUE,
created_at TIMESTAMPTZ);
Run inside psql
: COPY customers FROM '/data/exports/customers.csv' WITH (FORMAT csv, HEADER TRUE);
. Repeat for other tables. Use \copy
if the files sit on your client machine.
Compare counts: SELECT COUNT(*) FROM customers;
in ParadeDB vs. bq query
in BigQuery.Counts should match before continuing.
Activate search features: CREATE EXTENSION IF NOT EXISTS parade;
. Add a vector column if needed: ALTER TABLE products ADD COLUMN embedding VECTOR(1536);
.
Increase maintenance_work_mem
for faster COPY, disable WAL during bulk loads (ALTER TABLE ...SET UNLOGGED
), and batch indexes after data import.
Schedule nightly exports with bq extract
, load deltas via psql
, then cut over by pointing your app to ParadeDB once results match.
Use logical replication from PostgreSQL to downstream tools and decommission BigQuery once queries run successfully on ParadeDB.
Create indexes, test queries, and leverage Galaxy’s AI copilot to refactor any BigQuery-specific SQL to standard PostgreSQL.
.
Yes. Use gzip -d
first or pass PROGRAM 'gunzip -c /path/file.csv.gz'
to COPY.
Convert STRUCT to JSONB and ARRAY to PostgreSQL arrays or JSONB before export.
Export changes by timestamp filter in BigQuery and apply INSERT ... ON CONFLICT
in ParadeDB on a schedule.