Skip to main content

One post tagged with "dbt"

dbt data transformation models and workflows

View All Tags

Reverse-Engineer a SAP BW Cube into dbt Models on DuckDB

· 10 min read
Joachim Rosskopf
Co-Founder & CEO

An AI agent reverse-engineering a BW cube into dbt models, offline, with no SAP connection.

In Part 1 we extracted a BW system's metadata into a single DuckDB file with erpl-adt catalog sync — 53 cubes, 226 queries, every characteristic and key figure, all the lineage between them. Browsable, searchable, and completely decoupled from SAP.

Now we do the interesting thing. We unplug.

No SAP credentials in this post. No VPN, no connection, no --host. Just catalog.duckdb — the file from Part 1 — and an AI agent. The goal: take one cube (0D_NW_C01, "Actual for NW Demo") and its flagship query (0D_FC_NW_C01_Q0008, "YTD Sales by Sales Org") and reverse-engineer them into runnable dbt models on DuckDB. Reconstruct the star schema, the measures, and the year-to-date logic — from metadata alone, offline.

Here is exactly how it went.