Skip to main content
Shopify → PostgreSQL

Sync Shopify to PostgreSQL
in plain English.

Land Shopify orders, products, customers, and inventory in Postgres on the schedule you describe. Schema-qualified, customer PII excluded by default. Live on rsync.ai Cloud, or self-hosted.

TL;DR

rsync.ai's Shopify connector uses the Admin GraphQL API (v2024-10) to extract 6 resources and upserts them into Postgres under a dedicated `shopify` schema. Customer email, phone, and addresses are omitted from default queries. REPLICA IDENTITY is set for CDC publication safety. Works with Postgres 11+, RDS, Aurora, Cloud SQL, Supabase, Neon, Timescale.

  • Schema-qualified writes — shopify.orders, not public.orders
  • Scheduled batch sync — every minute, hour, or cron
  • Customer PII excluded from default GraphQL queries
  • Per-pipeline namespace isolation (multi-store ready)
How it works

How to sync Shopify to PostgreSQL — 5 steps

From chat prompt to rows in Postgres — a few minutes for a small store. Once the data lands, query it in the SQL Explorer or with Ask rsync.ai, shape it with Models, and publish Charts and Dashboards.

  1. 1

    Connect your Shopify store

    Provide your Shopify store subdomain (e.g. acme.myshopify.com) and a Shopify Admin API access token — custom-app token or OAuth-issued. Token is sent as `X-Shopify-Access-Token` on every request.

    shop + access_token
  2. 2

    Connect your PostgreSQL database

    Provide a connection string or host/port/user/password. rsync.ai supports Postgres 11+, Amazon RDS, Aurora Postgres, Google Cloud SQL, Azure Database for PostgreSQL, Supabase, Neon, Timescale, and self-managed clusters.

    postgres://user:pass@host:5432/db
  3. 3

    Describe the sync

    Type: 'Sync Shopify orders, products, and customers into Postgres every 5 minutes.' rsync.ai turns it into a pipeline — pulls schema from Shopify's GraphQL API, proposes Postgres tables under a `shopify` schema.

    No SQL · No Airflow · No DAGs
  4. 4

    Review proposed schema

    rsync.ai shows the 6 discovered Shopify resources with column counts. Tick which to sync. Postgres DDL preview: schema-qualified tables (`shopify.orders`), upsert unique index on the Shopify GraphQL `id` field, REPLICA IDENTITY set for CDC publication safety.

  5. 5

    Run on a schedule

    Each scheduled run paginates Shopify with Relay cursors (250 nodes/page), upserts into Postgres on `id`, and resumes from the saved cursor on failure. Live row counts and run history in the UI.

    Schema-qualified writes: shopify.orders, not public.orders

Shopify → PostgreSQL schema mapping

What rsync.ai proposes by default. Override columns, types, and JSONB strategy before approving.

Shopify resourcePostgres tableNotes
Ordershopify.ordersline_items embedded (first 10) — customer/email/address fields excluded by default
Productshopify.productsvariants embedded (first 5)
Customershopify.customersPII-free by default: id, timestamps, numberOfOrders, amountSpent, tags only
Collectionshopify.collectionsproductsCount, ruleSet (2024-10 schema)
InventoryItemshopify.inventory_itemsinventory_levels per location embedded (first 5)
Shopshopify.shopSingleton — 57 columns including plan, currency, timezone

rsync.ai vs. Fivetran, Airbyte, Zapier for Shopify → PostgreSQL

Honest feature comparison for the Postgres data path.

Featurersync.aiyouFivetranAirbyteZapier
Plain-English pipeline setup
Scheduled Shopify → Postgres sync
Schema-qualified writes (shopify.orders)
Per-pipeline namespace isolation
Shopify customer PII excluded by default
Source-available connector code
Self-host in your own VPC
No per-MAR / per-row pricing

Shopify to PostgreSQL — frequently asked

How long does a Shopify → Postgres sync take?

For a small dev store across 6 resources, the full chain — chat prompt, schema discovery, table selection, sync, verification — completes in roughly five minutes. Larger stores scale with row count and Shopify's GraphQL cost throttle. Orders, products and customers are then read incrementally; collections, inventory items and the shop record are re-read in full each run.

Is the Shopify → Postgres sync real-time, or scheduled?

Scheduled batch only today. The connector polls Shopify's Admin GraphQL API on the cadence you set (e.g., every minute, every hour). Webhook-based real-time CDC is on the roadmap. For most stores under ~10k orders/day a 1–5 minute schedule is functionally indistinguishable from real-time.

Does rsync.ai use JSONB or normalized tables for Shopify data in Postgres?

Today the destination connector creates flat columns matching the Shopify GraphQL schema, with nested resources (line items, variants, inventory levels) embedded as JSONB. Fully-normalized child tables with foreign keys are on the roadmap.

Which PostgreSQL versions and flavors are supported?

PostgreSQL 11, 12, 13, 14, 15, 16, 17. Hosted: Amazon RDS, Aurora PostgreSQL, Google Cloud SQL, Azure Database for PostgreSQL, Supabase, Neon, Timescale, plus self-managed clusters. SSL/TLS and SSH tunneling supported.

Does Shopify customer PII land in my Postgres?

By default, no. The Shopify connector's GraphQL Orders query omits customer, email, phone, billing_address, and shipping_address. The Customers query returns only id, timestamps, order metrics, and tags. The fields are never fetched, so they can't be written to Postgres. If you need them, you can customize the GraphQL query in your self-hosted deployment.

Does rsync.ai write Shopify data to a dedicated Postgres schema?

Yes. Tables land under a `shopify` schema by default (e.g., `shopify.orders`, `shopify.products`), and rsync.ai supports per-pipeline destination namespacing: if you connect a second Shopify store on the same Postgres, it gets its own auto-suffixed schema (e.g., `shopify_b094.orders`) — no collisions, no manual rename. You can also override the namespace explicitly.

Can downstream services subscribe to Postgres logical replication on the synced tables?

Yes — the destination connector sets `REPLICA IDENTITY USING INDEX` on the upsert unique index when writing, so a `FOR ALL TABLES` publication can replicate changes without the `cannot update table because it does not have a replica identity` error.

What happens during Shopify throttling or transient errors?

The Shopify GraphQL API uses a cost-point throttle bucket (server-side). The connector retries on throttle/transient errors with backoff and resumes from the last cursor. Upserts on Shopify's stable `id` field mean retried pages can't produce duplicate rows.

Is rsync.ai self-hostable for Shopify → PostgreSQL?

rsync.ai Cloud is live today at app.rsync.ai — nothing to deploy. You can self-host the full stack today — one command (`curl -sSL https://raw.githubusercontent.com/rsync-ai/rsync.ai/main/install.sh | bash`) brings it up inside your own VPC, so your Shopify access tokens and Postgres credentials never leave your network. rsync.ai is source-available under the rsync.ai Source-Available License: self-hosting is free for your company's own internal use, while reselling it or hosting it for others as a service needs a commercial license.

How much does Shopify → PostgreSQL cost?

rsync.ai Cloud starts free: the first 10 GB of data moved is free, then usage is billed by GB moved, and pipelines pause at your cap. There are no per-row or per-MAR fees. You can also self-host rsync.ai, which is source-available under the rsync.ai Source-Available License and free for your company's own internal use, and pay only for the compute you run it on.

Run your first Shopify to PostgreSQL pipeline free

The first 10 GB of data moved is free. Describe the sync in plain English and review the plan before anything runs.

Start free