Skip to content

v0.4.0 — left-align coded-integer numeric columns

Choose a tag to compare

@ralfbecher ralfbecher released this 26 May 09:31

Bug-fix release. Refines the table-alignment heuristic so coded integers (YYYYMM reporting periods, zero-padded IDs) stay left-aligned instead of being mistaken for measures.

What changed

Previously, any numeric column with a format pattern set in the OBML model was right-aligned. That's correct for quantities (#,##0.00, 0.00%, $#,##0) but wrong for coded integers carrying a bare "0" or "000000" format — those read as identifiers, not amounts, and should sit left alongside their text neighbours.

The new rule: right-align only when the format string contains a character outside 0 / # (i.e. a separator, decimal point, percent sign, or currency symbol).

Column type type format v0.3.x v0.4.0
String (Country) string left left
Bare numeric ID (Order Key) number left left
Coded integer (Reporting Period) number "0" / "000000" right left
Quantity (Revenue) number #,##0.00 right right
Percentage (PD) number 0.00% right right
Currency (Amount) number $#,##0 right right

Only the Coded integer row changes behaviour — all other columns render exactly as before.

Migration

No spec changes required. If you previously worked around this by stripping format: "0" from period dimensions in your OBML model, you can put it back — format_values=true still uses it, and the runner now treats it as a non-quantity format for alignment purposes.

Install

pip install orionbelt-runner==0.4.0
# with the PDF extra:
pip install 'orionbelt-runner[pdf]==0.4.0'

Full diff

v0.3.1...v0.4.0