Skip to content

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 ​

FormatContentsUse case
CSV (star schema)17 fact and dimension tablesPower BI Desktop, Tableau, Excel
NDJSONNewline-delimited JSON mirror of the CSV tablesData pipelines, dbt, custom tooling
XLSXSingle-workbook rollupQuick 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.

TemplateEditionPages
swao-report.pbitConsultant and EnterpriseOverview, Compliance, Signals, Risks, Auditor, Run Stats
swao-portfolio.pbitConsultant 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.

Power BI Auditor page with rationale coverage, block-level assessments and the signal-level false-positive auditThe Auditor page of swao-report.pbit for the Sovereign Health demo application: every signal carries its rationale and assessor.

Power BI Risks page with the risk register, risk scores and risk categoriesThe 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_hash

The 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_type is application or service; join the other portfolio tables on app_id to filter by type.
  • The workbook sheets Portfolio Overview, Migration Waves, Migration Candidates and Cost vs Risk end with an Assessment Type column; Source Data has computed.assessment_type (and computed.seven_r_label when 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 ​

bash
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 choice

By 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