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, PII-safe by default, source-available, 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)
See other destinations
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.

  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.

Feature
rsync.aiyou
Fivetran
Airbyte
Zapier
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 (auditable)
Self-hosted Postgres writes
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. Each run resumes from the previous cursor, so subsequent runs only pull new/changed rows.

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, 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?

Yes. Run the full stack via `docker compose up` inside your VPC. Shopify access tokens and Postgres credentials live in a control-plane Postgres you also host — no data, no credentials, no telemetry leaves your network. License is Elastic License 2.0.

How much does Shopify → PostgreSQL cost?

Source-available under Elastic License 2.0 — no per-row, per-MAR, per-table, or per-connector fees. You pay only for the compute you run it on. A single 4-core VM is enough for a typical Shopify store.