Odoo Databricks Connector | Databricks Integration, Odoo to Delta Lake Export
by Modvanta https://modvantaapps.tech$ 98.70

Odoo 19 and Databricks SQL
Your Odoo data in Delta tables, without writing an ETL job.
Pick an Odoo model and the fields you want. The module creates the Delta table in your Unity Catalog schema and keeps it current through the Statement Execution API of a SQL warehouse: changed records are merged on their Odoo id, deleted ones are removed. Databricks never writes back to Odoo.
What it does
You connect a workspace with its URL, the ID of a SQL warehouse and either a service principal (OAuth machine-to-machine, the method Databricks recommends for automation) or a personal access token. Test Connection reads the warehouse and runs SELECT 1, so you know the warehouse answers before anything else happens.
An export is one Odoo model going to one Delta table: Customers to main.odoo.odoo_customers, Sales orders to main.odoo.odoo_sale_orders. You choose the fields, an optional filter such as customer_rank > 0, and the table. The module writes the CREATE TABLE statement for you and shows it before the first run. Text, numbers, money, dates, yes/no fields and linked records are mapped to STRING, BIGINT, DOUBLE, DECIMAL(20,6), DATE, TIMESTAMP and BOOLEAN columns.
Incremental exports send only the records written since the last run, in one MERGE INTO statement per batch, so a record sent twice is updated, never duplicated. A sales order confirmed this morning shows up in the table at the next run with its new state and total. Records deleted in Odoo, or that no longer match the filter, are deleted from the table too. Full refresh empties the table and sends everything, which suits small reference tables.
Records are read with the access rights and record rules of a user you pick, so a salesperson-level user exports only what that user may see. Add a field later and the next run adds the column with ALTER TABLE. Each run is logged with rows sent, rows removed and the number of statements; each API call is logged without the token.
Who it is for
| Finance and operations teams that report on Odoo data in Databricks SQL dashboards or notebooks | |
| Data teams that want Odoo sales, contacts and products next to the rest of their lakehouse | |
| Companies on Azure Databricks, Databricks on AWS or Databricks on Google Cloud |
Key features
Screenshots from an Odoo 19 test database. The Databricks answers come from a test stand-in shaped like the Databricks API documentation, not from a live workspace.
All exports on one page
Model, target table, mode, schedule, the time of the last run, rows sent and the result of each export.

Pick the model, the fields and the filter
An export of res.partner with a filter on customers, incremental mode, Remove Deleted Records and a run every hour. id, write_date and odoo_synced_at are always added.
| Fields that are not stored or may hold a secret cannot be picked | |
| Technical models such as settings and users are refused |

See the table before it is created
The CREATE TABLE IF NOT EXISTS statement the module will run, with every column and its type. Create or Update Table runs it and adds columns for new fields.

Every run of an export
Full refresh of the product table, every day. When a run fails, the reason from the warehouse is kept, for example a missing schema, and the next run starts again.

Sync log across exports
Rows sent, rows removed and statements per run, with totals. One failing export never stops the others.

The workspace
Workspace URL, SQL warehouse, sign-in method, default catalog and schema, the user whose rights decide what is read, and how many rows go in one statement.
| Only https addresses on the Databricks workspace domains are accepted | |
| Secrets are visible to Odoo administrators only |

Every API call
Operation, endpoint, HTTP status and duration of each call, with the request and answer. Tokens and secrets are masked.

How it works
| 1 | In Databricks create a service principal with an OAuth secret, or a personal access token, and give it CAN USE on a SQL warehouse and write rights on the target schema. |
| 2 | In Odoo give the Databricks Manager group to the person who sets it up, then Databricks, Configuration, Workspaces: URL, warehouse ID, sign-in, Test Connection. |
| 3 | Export pick the model, the fields and the table, then press Create or Update Table. |
| 4 | Sync Now check the row count in the log, then tick Run on a Schedule. |
Settings
| Authentication | Service principal (OAuth client ID and secret) or personal access token |
| Default Catalog and Schema | Used when an export does not name its own |
| Read Odoo As | Exports read records with this user's access rights and record rules |
| Rows per Statement | 1 to 1000 rows in one INSERT or MERGE (fewer for wide tables) |
| Wait for a Statement | A statement still running after this many seconds is cancelled |
| Mode | Incremental (MERGE changed records) or Full refresh (TRUNCATE, then INSERT) |
| Remove Deleted Records | Incremental: rows of deleted or filtered-out records are deleted |
| Add Names of Linked Records | A <field>_name text column next to each many2one id |
| Run on a Schedule | Every N minutes (15 or more), hours or days, per export |
FAQ
Can Databricks change anything in Odoo?
No. The module only sends statements to your SQL warehouse and reads their result. There is no route into Odoo.
Are values pasted into the SQL text?
No. Every value is a typed named parameter of the Statement Execution API. Table and column names may only use letters, digits and underscores.
Which clouds work?
Databricks on AWS (cloud.databricks.com), Azure Databricks (azuredatabricks.net) and Databricks on Google Cloud (gcp.databricks.com). You need a SQL warehouse; serverless works.
Is the full refresh atomic?
No. It empties the table and then inserts in batches, so a reader can see a partly filled table during the run. Use incremental mode for tables people read all day.
How big can an export be?
Rows go in batches of up to 1000 rows and 2000 values per statement. A first run of 100,000 contacts is many statements, so start it outside office hours.
What happens to a field I remove from an export?
Its column stays in the table with its old values. Drop it in Databricks if you no longer want it.
Compatibility and support
Odoo 19 Community and Enterprise. Depends only on Discuss (mail). Needs a Databricks workspace with a SQL warehouse; the module makes HTTPS calls to your workspace only.
Questions before or after you buy: modvantaapps@gmail.com. We answer setup questions and fix bugs.
Buy Now - $99| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
Discuss (mail)
|
| Lines of code | 1136 |
| Technical Name |
mdv_databricks_connector |
| License | OPL-1 |
| Website | https://modvantaapps.tech |
Odoo Proprietary License v1.0 This software and associated files (the "Software") may only be used (executed, modified, executed after modifications) if you have purchased a valid license from the authors, typically via Odoo Apps, or if you have received a written agreement from the authors of the Software (see the COPYRIGHT file). You may develop Odoo modules that use the Software as a library (typically by depending on it, importing it and using its resources), but without copying any source code or material from the Software. You may distribute those modules under the license of your choice, provided that this license is compatible with the terms of the Odoo Proprietary License (For example: LGPL, MIT, or proprietary licenses similar to this one). It is forbidden to publish, distribute, sublicense, or sell copies of the Software or modified copies of the Software. The above copyright notice and this permission notice must be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Please log in to comment on this module