Cloud & Automation
Modern Report Engine
The design of a reference implementation for secure, tenant-aware analytical requests, cache decisions, Fabric queries, exports and operational monitoring.
- Status
- Design complete
- Level
- Advanced
Design complete: this page documents the architecture, specification and implementation plan. The reusable implementation has not been published yet; code, templates and demos will be linked here as each milestone ships.
Project overview
Who this is for
- Engineers building analytical APIs, report downloads, or application data access
- Architects designing tenant isolation, caching, and Fabric query boundaries
What this project demonstrates
- How to define a secure report request and API contract
- How to choose between synchronous, asynchronous, cached, and live execution paths
- How to enforce tenant isolation from authentication through result storage
- How to monitor request cost, cache behavior, query duration, and failures
Tech stack
- .NET
- Python
- Azure App Service
- Azure Functions
- Azure API Management
- Microsoft Fabric
- Fabric Warehouse
- Fabric Lakehouse
- Azure Storage
On this page
The problem
Applications often grow separate query logic in a web frontend, API controller, export job, and support script. Validation drifts, tenant rules become inconsistent, and expensive requests reach the analytical platform without a shared workload policy. This project designs one report engine that accepts intent and owns the governed path to results.
Architecture
- Clients
- Web UI
- Mobile
- External API
- API GatewayAzure API Management
- Report EngineApp Service or Azure Functions
- authentication
- validation
- tenant rules
- cache hitCacheAzure Storage · reuse the stored output
- cache missFabricWarehouse / SQL endpoint · run the query
- Result
- JSON
- CSV
- File
Web, mobile, and external API clients call Azure API Management or another gateway. A report-engine service may be implemented with .NET or Python after the project evaluates team skills and runtime constraints. Azure App Service and Azure Functions remain deployment options rather than a premature final choice.
The engine authenticates and authorizes, derives tenant identity from trusted claims, validates the report model, applies rate and concurrency limits, and performs a tenant-aware cache lookup. A cache hit returns the stored output; a cache miss runs an approved parameterized query against Fabric Warehouse or a Lakehouse SQL endpoint. A result builder produces paged JSON or stored CSV, Parquet, and other allowed formats.
The detailed Azure and Fabric view, with the storage hierarchy, output paths and monitoring, is in the Report Engine architecture reference. The Report Engine hub collects the articles behind each design decision.
API contract
The contract distinguishes small synchronous requests from large asynchronous work. Typed parameters cover report name, date range, allowed dimensions such as Date, Channel, or Account, approved filters, format, paging, and version. The engine rejects raw SQL, query fragments, excessive ranges, unsupported dimensions, and tenant identifiers that conflict with authenticated identity.
Large requests can use POST /reports, status polling by reportRequestId, and an authorized download endpoint. Idempotency prevents duplicate submissions from creating duplicate work.
Cache model
The cache key includes tenant, report type, normalized date range, dimensions, filters, format, and report definition version. Entries carry creation time, source freshness, expiration, size, and access scope. The reference demonstrates time-based and refresh-driven invalidation while documenting cases where live execution is safer.
Multi-tenancy and query layer
Tenant identity flows from authentication into authorization, cache keys, query parameters, result storage paths, and audit events. The browser is never the sole authority for tenant_id. Query templates are allow-listed and parameterized. Row and byte limits protect both Fabric and the application process.
Monitoring
Every request records request and correlation IDs, tenant and client identifiers, report name, timestamps, total and query duration, cache outcome, rows, bytes, status, and error code. Dashboards separate interactive and export workloads and connect to the Data Platform Monitoring and Observability series.
Implementation milestones
Nothing is published yet. The reference implementation will be built in these milestones:
- API contract: typed report requests, synchronous and asynchronous paths, validation rules and idempotency.
- Identity and tenancy: tenant identity from trusted claims, carried into authorization, cache keys, query parameters, storage paths and audit events.
- Query layer: allow-listed, parameterized templates against Fabric Warehouse or a Lakehouse SQL endpoint, with row and byte limits.
- Cache: tenant-aware keys with time-based and refresh-driven invalidation.
- Results and exports: paged JSON, stored CSV and Parquet, status polling and authorized downloads.
- Monitoring: per-request telemetry and dashboards that separate interactive and export workloads.
- Runtime decision: .NET or Python, App Service or Azure Functions, recorded with the reasons before code is published.
Project deliverables
- A versioned API contract for synchronous and asynchronous report requests
- A report-engine service enforcing authentication, validation and tenant rules
- Approved, parameterized query templates for Fabric
- A tenant-aware result cache with documented invalidation
- Export paths for JSON, CSV and Parquet
- Request telemetry and an operational dashboard
Future custom reports
A metadata model may allow versioned custom report definitions without granting arbitrary SQL. Future work includes approval workflow, safe dimensions and measures, schema compatibility, definition testing, auditing, and migration. No repository, demo URL, or implementation language is claimed until those choices and artifacts exist.
Repository, demo and downloads
Nothing has been published yet. The repository, demo and downloads will be linked here when they exist.
Have feedback or want to collaborate? Contact me