Validate a report with dpm-xl¶
dpm-xbrl reads a report and checks how the file is written. Whether the values are right, for example that a total equals the sum of its parts, is decided by the EBA validation rules, written in DPM-XL. The sibling package dpm-xl parses and evaluates those rules.
The two packages are independent: neither depends on the other. You
connect them with a small DataProvider that answers dpm-xl's queries for
table, row and column cells from the facts that dpm-xbrl reads. The mapping
from a datapoint code to its table, row and column comes from the DPM
release of the taxonomy.
The dpm-xl documentation has the full, tested walk-through:
from an XBRL report to explained failures. It reads a
report with read_report, binds its facts to a provider through an
explicit datapoint mapping, evaluates rules with dpm-xl's columnar engine,
falls back to the reference engine where the columnar engine does not
support a rule, and explains each failure.
What dpm-xbrl gives the provider¶
Report.facts, each withdatapoint,template,keysandvalue(see the fact model). For large reports, read the tables as frames instead and hand the frames to dpm-xl's columnar engine.Report.filing_indicators, keyed by template code, for dpm-xl'stable_reported. Map a table file to its filing indicator as described in table codes and filing indicators.Report.parameters(such asrefPeriodandbaseCurrency) andReport.decimals_parameters, for dpm-xl'sparameter.
from dpmxbrl import read_report
report = read_report("report.zip")
print(report.parameters["refPeriod"], report.filing_indicators["C_26.00"])
print([(fact.datapoint, fact.value) for fact in report.facts_for_template("C_26.00")])
2025-12-31 True
[('dp457468', '56058000'), ('dp32024', '92592000'), ('dp32026', '86911000'), ('dp32025', '0.71')]
Values are strings as written; convert numbers with the decimals parameter that applies to their data type before evaluating rules.