ml-connector
OdooDatabricks

Odoo and Databricks integration

Odoo handles your accounting, purchasing, and inventory across the business. Databricks is where you centralize and analyze all that data. Connecting the two keeps your analytics warehouse current with every invoice and purchase order, mapped to cost centers and business units so you can slice spend and profitability by any dimension. ml-connector runs on your close schedule, not real-time, so it aligns with how accounting actually works.

How Odoo works

Odoo exposes invoices, payments, purchase orders, GL accounts, cost centers, and product data through XML-RPC or JSON-2 REST APIs (JSON-2 is the modern choice in Odoo 19+). Authentication uses an API key paired with a username, passed in every call to identify the session. Odoo Online, Odoo.sh, and self-hosted editions all expose the same API surface with different base URLs. Odoo has no outbound webhooks suitable for production finance pipelines; polling via write_date filters and high-water-mark timestamps is the standard pattern.

How Databricks works

Databricks is a data platform that ingests, transforms, and serves data at scale using Apache Spark and Delta Lake. It accepts data through REST APIs and SQL queries, with OAuth2 client credentials required for every call (a Service Principal with client_id and client_secret). Databricks has no native finance or ERP objects; it is purely a data destination. Tables are written through SQL or Spark; REST writes are metadata only. Webhooks exist only for MLflow Model Registry events, not for data arrival or table writes, so inbound notifications must be replaced with polling.

What moves between them

Account moves (invoices and journal entries), purchase orders, GL accounts, and cost centers flow from Odoo into Databricks tables on a schedule aligned to your month-end close. Each Odoo company becomes a schema in Databricks, and each Odoo account and cost center becomes a row in dimension tables that fact tables then reference. The sync is one-way (Odoo to Databricks); Databricks is read-only for downstream analytics.

How ml-connector handles it

ml-connector stores the Odoo API key encrypted and refreshes it at the start of each sync cycle (API keys do not expire but may be rotated). It polls Odoo using JSON-2 where available, filtering account.move and purchase.order by write_date to pick up only new and changed records since the last run. For each tenant-specific Odoo instance URL, it validates connectivity and read permissions before extracting data. Cost centers (analytic accounts) are mapped first so every GL line item has a valid cost center dimension in Databricks. The sync writes table metadata and rows through SQL statements to avoid table truncation; if a row has already been written (detected by unique key on Odoo record id), the row is updated instead. ml-connector retries failed extracts on exponential backoff and logs every record movement to the audit trail so any failed row can be re-extracted on demand.

A real-world example

A mid-sized professional services firm uses Odoo for accounting and project costing, and Databricks for consolidated analytics across multiple legal entities and cost centers. Previously, the finance team ran manual SQL queries against Odoo's database at month-end to build reporting tables, risking stale data and human error. Now, ml-connector extracts invoices, expenses, and projects at the start of month-end close, loads them into Databricks with cost center mappings already in place, and hands off to the analytics team. By the time the CFO requests a profitability breakdown by client and cost center, the raw data is already current and clean.

What you can do

  • Extract Odoo invoices, payments, purchase orders, and GL accounts; load them into Databricks tables on your month-end close schedule.
  • Map Odoo cost centers (analytic accounts) to Databricks schemas so spend and revenue land on the correct business unit dimensions.
  • Authenticate both Odoo API key and Databricks OAuth2 client credentials, and refresh them as needed.
  • Detect new and changed Odoo records using write_date filters and high-water-mark timestamps, so every sync is efficient and repeatable.
  • Track every extracted row in the audit trail and replay any failed records on demand without manual re-keying.

Questions

Does ml-connector support all Odoo editions (Online, Odoo.sh, self-hosted)?
Yes. ml-connector accepts the base URL for any Odoo instance and uses the same JSON-2 API surface across all editions. XML-RPC is also supported for older instances, though JSON-2 is the recommended path forward as XML-RPC is scheduled for removal in Odoo 22. Odoo Online users must have a password set by admin before API authentication works.
Can Odoo push changes to Databricks, or does ml-connector always pull?
Odoo has no production-grade outbound webhooks suitable for finance pipelines, so ml-connector always polls. It runs on a schedule you define (typically aligned to your close calendar), filtering by write_date to capture only new and changed records since the last run.
What happens if an Odoo record fails to load into Databricks?
Every failed record is logged to the audit trail with the error detail. ml-connector can then replay that specific record on demand without re-extracting the entire dataset. Failed loads do not block the sync; ml-connector logs them, continues with the next record, and alerts you to the issue.

Related integrations

Connect Odoo and Databricks

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

Get started