6. Export BI
Select option 6 from the main menu (or run swao export) to generate a structured data export bundle for use in Power BI, Tableau, Excel, or any other BI tool.
Export formats
| Format | Contents | Use case |
|---|---|---|
| CSV (star schema) | 17 fact and dimension tables | Power BI Desktop, Tableau, Excel |
| NDJSON | Newline-delimited JSON mirror of the CSV tables | Data pipelines, dbt, custom tooling |
| XLSX | Single-workbook rollup | Quick review, stakeholder sharing |
The star schema export is available in every edition, including Community Community.
Pre-built Power BI templates
On Consultant and Enterprise, two .pbit templates are included in your workspace under wsp/templates/powerbi/ Consultant. On Community, swao export writes the star schema and a licence notice instead of the templates.
| Template | Edition | Pages |
|---|---|---|
swao-report.pbit | Consultant and Enterprise | Overview, Compliance, Signals, Risks, Auditor, Run Stats |
swao-portfolio.pbit | Consultant and Enterprise (portfolio data needs Enterprise) | Portfolio overview, heatmap, compliance, risk and 7R, wave sequencing |
Open the .pbit file in Power BI Desktop, set SWAOExportPath to your star/ folder, and click Load.
The Auditor page of swao-report.pbit for the Sovereign Health demo application: every signal carries its rationale and assessor.
The Risks page of swao-report.pbit: risk register with likelihood, impact and mitigation, ranked by score.
Code health per run
The star schema contains fact_code_health_run.csv (bundle schema 1.6.0): one row per run of the app that has a code health result, oldest first, up to the exported run. It carries the overall score, the four KPIs (complexity, maintainability, duplication, configuration hygiene), files, NLOC, hard-coded URLs and IPs, the duplication percentage and a settings_hash. Runs with different settings_hash values measured a different file set (test-code rules, source.exclude), so a KPI jump between them is not a code change. The table drives the same trend as the publication (Pass 26). The portfolio export contains it too.
app_id,run_id,run_folder,run_date,overall,complexity,maintainability,
duplication,configuration_hygiene,files,nloc,hardcoded_urls,hardcoded_ips,
duplication_pct,settings_hashThe bundled .pbit templates load this table from their next template update; until then, add it in Power BI Desktop as a CSV query on fact_code_health_run.csv, related to dim_app on app_id.
Portfolio export (application and service apps)
swao service export Enterprise writes the portfolio star schema (wsp/star-schema/portfolio-*.json, 9 tables) and the portfolio workbook (wsp/reports/swao-portfolio-YYYYMMDD.xlsx, 14 sheets) from wsp/portfolio-summary.json. Since the combined portfolio view (Portfolio Operations) both hold application and service apps:
dim_service_app.assessment_typeisapplicationorservice; join the other portfolio tables onapp_idto filter by type.- The workbook sheets Portfolio Overview, Migration Waves, Migration Candidates and Cost vs Risk end with an
Assessment Typecolumn; Source Data hascomputed.assessment_type(andcomputed.seven_r_labelwhen an application app is present).
A service-only workspace produces the same tables and sheets as before, apart from the new column. The .pbit templates above read the application export (swao export) and are unchanged; a Power BI model over the portfolio tables filters on dim_service_app.assessment_type.
CLI
swao export --app my-app --formats csv,ndjson,xlsx
swao export --app my-app --output D:/bi/my-app # bundle to a folder of your choiceBy default the bundle goes to apps/<id>/wsp/exports/<timestamp>/. With --output <dir> it goes to <dir> (created when missing, with star/, ndjson/ and xlsx/ below it). In both cases SWAO refreshes wsp/exports/latest/star/, the folder the Power BI templates read, so a template keeps loading the newest export. CSV cells carry no line breaks (a line break inside a text becomes a space); NDJSON and XLSX keep them.
See also: Publish HTML
