| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Lines of code | 1071 |
| Technical Name |
odoo_redshift |
| License | OPL-1 |
| Website | https://niyulabs.com |
| Versions | 15.0 16.0 17.0 18.0 19.0 |
Amazon Redshift Connector
Export your Odoo data to Amazon Redshift using an S3 bucket pipeline. Get fast analytics, dashboards, and BI reporting.
Odoo runs operations — Redshift runs analytics.
✅ Super Simple Example
Export Sales Orders from Odoo → the connector uploads a CSV.GZ to S3 → Redshift COPY loads it → you open Redshift Query Editor and run SELECT to see the table.
What does this connector do?
It connects Odoo → S3 → Amazon Redshift so your Odoo data becomes analytics-ready tables in Redshift.
Export Any Model
Export any Odoo model (standard or custom), for example:
- Sales Orders, Invoices, Customers
- Products, Inventory, Purchase
- Custom models from your modules
Incremental (New + Changed)
It exports only new rows and updated rows using a cursor (like write_date + id).
This saves time, cost, and avoids duplicate rows.
Fast Loading with S3 COPY
Instead of slow row-by-row inserts, it uploads a compressed CSV to S3 and uses Redshift COPY for high-speed ingestion.
Auto Export (Schedule)
Enable Auto Export and choose an interval. The connector resumes from the last cursor. It runs in batches and stops safely when the time limit is reached.
Why Redshift?
Redshift is built for analytics at scale. Use it for BI dashboards, finance reporting, cohort analysis, and large joins that are slow in OLTP databases.
How it works (Odoo → S3 → Redshift)
No manual SQL needed. The connector handles staging, COPY, and MERGE.
1) Upload to S3
Odoo creates CSV.GZ and uploads to your bucket
2) COPY to staging
Redshift reads that S3 file using an IAM Role
3) MERGE to final
Updates existing rows and inserts new rows
4) Cleanup + Cursor
Drops staging & saves last_sync/last_id for next run
Where is the data stored?
- Final analytics table is in Redshift (Query Editor shows it).
- S3 files are usually temporary (optional keep/delete).
- Staging tables exist only during load, then are dropped.
Why you may not see files in S3?
By default, many setups delete S3 files after COPY to reduce storage and keep data private. If you want to keep them, enable a “Keep S3 files” option (or ask your admin to disable auto-delete).
res.partner or product.product, then move to large tables.
Create S3 Bucket + IAM Permissions
You need an S3 bucket where Odoo uploads batches, and an IAM Role so Redshift can read those files for COPY.
1A) Create an S3 bucket
- Open AWS Console → search S3
- Click Create bucket
- Choose a name (example:
niyu-redshift-odoo-exports) - Pick a region (example:
ap-south-1) - Keep Block all public access = ON
- Create bucket
1B) Create IAM Role for Redshift COPY
- AWS Console → search IAM → Roles
- Click Create role
- Trusted entity: AWS service
- Use case: select Redshift (or Redshift Serverless)
- Attach policy: allow s3:GetObject on your bucket prefix
- Create role and copy its Role ARN
Required IAM Permissions (Simple Policy)
You normally need two permission sets: (1) Odoo uploader to write files to S3, and (2) Redshift COPY role to read files from S3.
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "ListBucketPrefix",
"Effect": "Allow",
"Action": ["s3:ListBucket"],
"Resource": "arn:aws:s3:::YOUR_BUCKET_NAME",
"Condition": {"StringLike": {"s3:prefix": ["odoo_exports/*"]}}
},
{
"Sid": "WriteObjects",
"Effect": "Allow",
"Action": ["s3:PutObject", "s3:AbortMultipartUpload"],
"Resource": "arn:aws:s3:::YOUR_BUCKET_NAME/odoo_exports/*"
}
]
}
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "ReadObjectsForCopy",
"Effect": "Allow",
"Action": ["s3:GetObject", "s3:GetObjectVersion"],
"Resource": "arn:aws:s3:::YOUR_BUCKET_NAME/odoo_exports/*"
},
{
"Sid": "ListBucketForCopy",
"Effect": "Allow",
"Action": ["s3:ListBucket"],
"Resource": "arn:aws:s3:::YOUR_BUCKET_NAME",
"Condition": {"StringLike": {"s3:prefix": ["odoo_exports/*"]}}
}
]
}
s3:DeleteObject permission to the Odoo uploader policy.
Create Redshift (Serverless) + Get Host/Namespace
You will copy the Workgroup endpoint (host), choose a database name, and ensure the IAM Role is associated so COPY can read from S3.
2A) Create Redshift Serverless
- AWS Console → search Amazon Redshift
- Choose Redshift Serverless
- Create Namespace and Workgroup
- Set admin user/password (or use existing)
- Ensure network allows connection (VPC / security group)
Workgroup: compute + endpoint you connect to (host)
2B) Where to find Host + Database
- Host (endpoint): Redshift Console → Serverless → Workgroups → click workgroup → copy Endpoint
- Database name: often
devby default - Port: typically
5439 - Username/Password: from your Redshift admin
your-workgroup-id.account-id.region.redshift-serverless.amazonaws.com
Configure the Connector in Odoo
Go to: Settings → Amazon Redshift Connector. Fill Redshift + S3 settings.
Redshift fields to fill
- • Host: Workgroup endpoint
- • Port: 5439
- • Database: typically
dev - • User / Password: DB user
- • Schema: e.g.
odoo - • COPY IAM Role ARN: Role for S3 access
S3 fields to fill
- • Bucket: Your bucket name
- • Region: e.g.
ap-south-1 - • Prefix: e.g.
odoo_exports/ - • Keep S3 files: ON (Keep) / OFF (Delete)
- • Compression: CSV.GZ (Recommended)
AWS credentials for S3 upload (important)
Odoo must be able to upload the CSV to S3. Choose ONE method:
Create an Export in Odoo
Pick model and fields. Run now or schedule it.
What is an Export?
An Export is a saved “sync definition” (table name + model + fields + filter + schedule). You can create many exports (Sales Orders, Invoices, Customers, etc.).
Configuration Fields
- • Export Name: final Redshift table name
- • Odoo Model: which model you export
- • Columns: fields you want in Redshift
- • Domain Filter: optional filter logic
- • Batch Size: e.g., 50,000 rows
- • Time Limit: stop safely and resume
Domain filter examples
[('state','=','sale')]
[('company_id','=',1),('amount_total','>',1000)]
Check Data in Redshift Query Editor
Verify that your Odoo data is flowing correctly into your AWS warehouse.
Standard verification steps
- AWS Console → Amazon Redshift
- Left menu → Query editor v2
- Connect to your Workgroup
- Select your database (e.g.,
dev) - Run a query to check counts:
SELECT COUNT(*) FROM odoo.sale_order;
SELECT * FROM odoo.sale_order LIMIT 50;
Auto Export + Time Limit Resume
Designed to handle millions of records without thread explosion or Odoo timeouts.
How resume works
Every batch updates last_sync and last_id. On the next run, it fetches the next batch using that cursor. If the Odoo time limit hits, it ends the request cleanly and the Auto Export (cron) triggers the next run later.
Recommended settings
- Batch size: 25k–50k rows
- Time limit: 60–120 seconds
- Auto export interval: 10–30 minutes
Security Best Practices
Ensuring least-privilege access for your data pipeline.
✅ S3 bucket
- Block all public access = ON
- Use a prefix like
odoo_exports/ - Enable lifecycle rules to delete old files
✅ IAM roles
- Separate roles for uploader vs COPY role
- Limit permissions to bucket + prefix only
- Prefer Instance Roles over Access Keys
Fix Problems (Most Common)
Quick fixes for common configuration issues.
Error → Fix
s3:GetObject on the bucket prefix.FAQ
Duplicate rows?
No. We use a staging table + MERGE logic to ensure each row remains unique.
SQL knowledge?
None required for setup. The connector handles all table creation and copy scripts.
S3 Visibility?
Files are temporary. If you need to audit them, enable the “Keep S3 files” toggle.
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