BIEscape
Tableau to Power BI

Convert a Tableau workbook to SQL

BIEscape transpiles calculated fields into ANSI SQL you can drop into Snowflake, BigQuery, Postgres, DuckDB, or a dbt model file. It does not rebuild the full semantic layer or write schema.yml.

What BIEscape does
  • Map IIF, IF/THEN, ZN, IFNULL, CONTAINS, STARTSWITH, LEN, TRIM, UPPER/LOWER, ABS, ROUND, CASE, and date functions to ANSI SQL.
  • Emit FIXED LOD as window functions or grain CTEs/subqueries; INCLUDE/EXCLUDE at the worksheet view grain.
  • Emit one CREATE VIEW per datasource (SELECT * + row-level calc columns; bare aggregates as comments). dbt config only with --format dbt, plus a markdown audit.
Honest limits
  • Unknown functions become SQL comments rather than guessed translations.
  • dbt output is drop-in SQL, not a generated schema.yml or package scaffold. Table calculations stay as TODOs.

FAQ

Does BIEscape convert Tableau to SQL?
It transpiles calculated-field formulas to ANSI SQL with one CREATE VIEW per datasource. Datasource joins and table calcs are not fully rewritten.
Are LOD calculations converted?
FIXED, INCLUDE, and EXCLUDE are rewritten as SQL window functions or grain subqueries. INCLUDE/EXCLUDE need a worksheet view grain (for example Sheet 1 rows/cols).
Can I run this locally?
Yes. Clone https://github.com/lukashalim/scapeTableau, then pip install -r requirements.txt and python cli.py process.

Hyper → Excel uses the desktop converter. Clone the repo at https://github.com/lukashalim/scapeTableau.