> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lerian.studio/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect Reporter to Midaz

> How Reporter connects to your Midaz data to build reports — the datasource model, what's set up at deploy, and what you configure yourself.

**Reporter** builds reports by **reading** your data: it runs read-only queries against your Midaz data (and any other Lerian product data) and renders templates over the results. It never writes back to the ledger.

For where this sits in the bigger picture, see [Building a complete core banking](/en/building-a-complete-core-banking).

## How Reporter reaches your data

***

Reporter connects through named **datasources**. Each one points at a database — for example `midaz_onboarding` and `midaz_transaction` — and your templates reference it by name, like `{{ midaz_onboarding.account.name }}`.

Datasources are configured **when Reporter is deployed**, not from your application. How they're declared depends on how you run Reporter:

* **Managed (Lerian-hosted):** the connection to your Lerian product data is set up for you during onboarding — you don't define datasource variables yourself.
* **Self-hosted:** your operator declares each datasource through `DATASOURCE_<NAME>_*` environment variables, including any of your own databases (`DATASOURCE_EXTERNAL_*`).

→ Full datasource configuration: [Using Reporter](/en/reporter/using-reporter)

## What you do

***

However it's deployed, your job as a report author is the same: **build templates** that reference the datasources by name. You can also **add your own data sources** — your operator declares them in a self-hosted setup, or they're onboarded for you in a managed one — and then reference them in templates just like the Midaz ones.

→ [Reporter quick start](/en/reporter/reporter-quick-start) · [Build templates](/en/reporter/using-reporter)

## Read-only — point it at a replica

***

Reporter only ever **reads**: it issues `SELECT` queries to render reports and never writes to your databases. As a best practice, point its Midaz datasources at a **read replica** (the reference setup does, with a `midaz-postgres-replica` host) so reporting load stays off your primary. This is a deployment recommendation — Reporter doesn't enforce it.

## See it in Lerian

***

* The full integration journey: [Building a complete core banking](/en/building-a-complete-core-banking)
* What Reporter is: [What is Reporter?](/en/reporter/what-is-reporter)
* Configure datasources and build templates: [Using Reporter](/en/reporter/using-reporter)
