The EU's Corporate Sustainability Reporting Directive (CSRD) moved sustainability reporting from glossy PDFs toward audited, structured data. For developers, that changes the job: ESG reporting now looks a lot like financial reporting infrastructure.
The moving parts
- ESRS: the reporting standards, covering environment (E1–E5), social (S1–S4), and governance (G1), plus cross-cutting standards.
- Double materiality: companies report on topics material either for their impact on people and environment, or for financial risk to the company, or both.
- Assurance: an auditor checks the report, so data needs traceability.
- Digital tagging: reports are expected to be machine-readable using the ESRS XBRL taxonomy.
What a pipeline looks like
Sources Staging Model Output ─────── ─────── ───── ────── ERP (spend, energy) ─┐ HR (headcount, pay) ─┼──▶ raw tables ──▶ datapoint layer ──▶ report + XBRL Facilities (meters) ─┤ (with lineage) Suppliers (Scope 3) ─┘ │ audit trail
1. Ingest
Pull from ERP, HR, facilities, and supplier systems. Keep the raw extract and its timestamp.
2. Map to datapoints
Each ESRS datapoint you report becomes a defined metric:
type Datapoint = { code: string; // ESRS datapoint identifier description: string; unit: string; period: { start: string; end: string }; value: number | string; method: string; // how it was calculated sources: string[]; // links to raw records owner: string; // accountable person status: "draft" | "reviewed" | "approved"; };
3. Calculate with lineage
Emissions (E1) come from activity × factor (how that works). Workforce metrics (S1) come from HR data. Store which records and which method produced each number.
4. Review and approve
Sustainability data has owners across the business. Build a review workflow with sign-off.
5. Output
Generate the narrative report and the tagged digital version.
Engineering principles
- Treat it like financial data. Controls, approvals, immutability, reconciliation.
- Lineage is the feature. Auditors will ask "where does this number come from?"
- Version methods. When a calculation changes, keep both and explain.
- Separate estimates from measured data, and label them.
- Don't hard-code the standards. ESRS are being simplified. Model datapoints as configuration.
Overlaps with other EU rules
CSRD data overlaps with EUDR (supply chain), the EU Taxonomy, and CSDDD (due diligence). Building a shared data layer saves duplicate work. See CSRD vs EUDR vs CSDDD.