Let your DuckDB quack SAP!
Disclaimer: This extension is currently in an experimental state. Feel free to try it out, but be aware that minimal testing and benchmarking were done.
With ERPL, use Enterprise Data in your Data Science and ML pipelines within minutes!
Quick Install
Install with two lines of code in DuckDB (unsigned option must be set):
INSTALL 'erpl' FROM 'https://get.erpl.io';
LOAD 'erpl';
🤖 Using an AI assistant? ERPL ships a Claude Code plugin: twelve skills that
know the erpl SQL surface from setup to operation, and commands that check a connection, diagnose a
failure or run a BW query for you. Install with /plugin marketplace add DataZooDE/erpl → /plugin install erpl@erpl.
Quicklinks
★ What is the ERPL Extension?
The primary objective of this DuckDB extension is to facilitate seamless integration with the SAP data ecosystem. Our approach prioritizes:
- Minimal dependencies: Ensuring a lightweight experience.
- User-centric design: Intuitive and straightforward usage for DuckDB users.
We focus predominantly on two main use cases:
- Data Science & Analytics: Directly accessing data from SAP ERP (via RFC) and SAP BW (via BICS) for interactive analytical tasks.
- Data Replication: Efficiently migrating data from SAP ERP or SAP BW into DuckDB for incorporation into DuckDB-centric data workflows.
Please be aware that DataZoo GmbH is the independent developer of this extension and does not hold any affiliation with DuckDB Labs or the DuckDB Foundation. "DuckDB" is a trademark registered by the DuckDB Foundation.
The extension suite currently supports:
- Data queries from SAP ERP tables and CDS views (via RFC)
- Execution of arbitrary RFC function modules
- SAP BW cube and query execution via BICS protocol
- BW hierarchy extraction, metadata views, and lineage analysis
- Data extraction and replication via SAP ODP (full and delta)
- CDS entity extraction via the ABAP Pipeline Engine, with delta including deletes
- SSH tunnelling via the companion erpl_tunnel extension
- Virtual catalog mounting of SAP systems via ATTACH
Transparency is our ethos, and in line with this, we are planning a commercial trajectory for the extension, structured as follows:
- Community Edition: A gratis version for individual users, both private and commercial, enabling queries from SAP ERP tables.
- Commercial License: Designed for businesses developing services or products leveraging our extension. More details can be found in our BSL v1. License.
- Enterprise Edition: A premium version offering additional capabilities to query data from SAP Business Warehouse and data replication via SAP ODP.
For inquiries, potential collaborations, or if your curiosity is piqued, connect with us at https://erpl.io.
Back to Top
⚙ Example Usage
A first example demonstrates how to join two SAP tables with an external table. We'll be using the ABAP Flight Reference Scenario, specifically joining the SFLIGHT and SPFLI tables which contain flight and flight schedule details respectively, with an external table WEATHER that holds weather information. We will extract flight information and associated temperatures at departure and arrival cities.
To start with, we assume you have setup DuckDB and already installed the ERPL extension (see below) and have access to an SAP system having the ABAP Flight Reference Scenario data.
First we start DuckDB with the -unsigned - flag set. Then we load the extension and configure the necessary credentials to connect to the SAP system:
LOAD 'erpl';
CREATE PERSISTENT SECRET abap_trial (
TYPE sap_rfc,
ASHOST 'localhost',
SYSNR '00',
CLIENT '001',
USER 'DEVELOPER',
PASSWD 'ABAPtr2025#SP00',
LANG 'EN'
);
In our case we use the docker based ABAP Platform Trial. The credentials are set by default, details can be found in the documentation of the docker image.
Now we explore the schema of the three tables tables:
SELECT * FROM SAP_DESCRIBE_FIELDS('SFLIGHT');