ml-connector
PlexSnowflake

Plex and Snowflake integration

Plex runs your manufacturing operations and finances. Snowflake holds your data warehouse. Connecting the two keeps your operational data synchronized with your analytics layer so reporting, reconciliation, and audits run on fresh data. Orders, invoices, inventory levels, and cost data flow from Plex into Snowflake on a schedule you control, and the data is queryable immediately. ml-connector handles the OAuth2 credential exchange and maps Plex entities to Snowflake tables.

How Plex works

Plex exposes suppliers, purchase orders, invoices, inventory, parts, GL accounts, sales orders, and production records through a REST JSON API authenticated with OAuth2 bearer tokens and at https://cloud.plex.com/api, as well as a legacy SOAP datasource interface requiring Basic auth and a company code (PCN). Plex does not offer native webhooks, so connectors must poll on a configurable interval, filtering by modified_date or created_date to retrieve only new and changed records. The REST API is the preferred transport for new integrations.

How Snowflake works

Snowflake is a cloud data warehouse that stores and queries data in user-defined tables and databases. It accepts data via REST API authenticated with key pair authentication (RSA private key and JWT) or programmatic access tokens. Snowflake has no native push webhooks; all external data arrives via connector writes or scheduled SQL tasks. Queries use standard SQL and support native CDC via Snowflake Streams for change detection. Warehouse auto-resume must be enabled for queries to succeed.

What moves between them

Data flows from Plex into Snowflake. ml-connector polls Plex REST API on a configurable interval (typically every 5-15 minutes) for suppliers, purchase orders, invoices, payments, inventory, parts, GL accounts, and production data. Each record is written to a corresponding Snowflake table, with ml-connector upserting on a primary key to avoid duplicates. Change detection uses Plex's modified_date field so only new or updated records are synced. Snowflake is the final store; ml-connector does not write data back to Plex.

How ml-connector handles it

ml-connector stores the Plex OAuth2 client credentials encrypted and refreshes the bearer token before it expires. On each poll cycle, it filters the Plex REST API by modified_date to retrieve only records that are new or changed since the last successful sync, then maps Plex entity fields to Snowflake table columns. Before writing, it prepares the target table with the correct schema if it does not exist. ml-connector uses Snowflake key pair authentication (JWT) to authenticate all API calls. Writes use the upsert pattern with a Snowflake MERGE statement to avoid re-inserting duplicate records. If a Plex poll times out or Snowflake returns HTTP 429, ml-connector backs off exponentially and retries. Every record includes a sync timestamp and a reference to the source API call, enabling full audit and replay if needed.

A real-world example

A mid-sized discrete manufacturer uses Plex for ERP and production planning across three plants. The finance and operations teams rely on Snowflake for daily reporting and month-end close, but were manually exporting Plex data several times a day and re-loading it into Snowflake, causing delays and reconciliation errors. With Plex and Snowflake connected, each Plex change (a new invoice, a shipment, an inventory adjustment, a GL posting) flows into Snowflake within minutes. Dashboards show current AP and inventory positions in real time, and month-end close no longer requires a manual Plex export step.

What you can do

  • Poll Plex on a configurable interval and sync suppliers, purchase orders, invoices, inventory, GL accounts, and production records into Snowflake tables.
  • Use Plex modified_date filtering to sync only new and changed records, minimizing data transfer and query cost.
  • Authenticate Plex with OAuth2 bearer tokens and Snowflake with key pair JWT, storing both credential sets encrypted.
  • Upsert records into Snowflake using MERGE statements to avoid duplicates and keep historical versions with timestamps.
  • Include a full audit trail with sync timestamps and source references on every record for compliance and debugging.

Questions

Which direction does data flow between Plex and Snowflake?
Data flows one direction: from Plex into Snowflake. ml-connector polls Plex on a schedule, filters by modified_date to fetch only new and changed records, and upserts them into Snowflake tables. Snowflake is read-only from Plex; ml-connector does not write data back into Plex.
Does the integration support Plex's legacy SOAP datasources, or just the REST API?
ml-connector uses the Plex REST API at https://cloud.plex.com/api, which is the preferred transport for new integrations. Legacy SOAP datasources are supported but require Basic auth and a company code (PCN); if your Plex instance relies on SOAP, contact support to migrate to REST or to enable the legacy datasource connector separately.
How does ml-connector detect which Plex records are new or changed?
ml-connector filters the Plex REST API by modified_date on each poll cycle, retrieving only records that were created or updated since the last successful sync. This approach minimizes data transfer and avoids re-processing unchanged records. The sync timestamp is stored in Snowflake alongside the record for full traceability.

Related integrations

Connect Plex and Snowflake

Free to use. Add your credentials, ping your real systems, and see if we fit.

Get started