Skip to content

parse_market_value macro does not handle billion (bn) notation #354

@dcaribou

Description

@dcaribou

Description

The parse_market_value macro in dbt/macros/parsing.sql uses the regex (£|€)([0-9\.]+)(Th|k|m|M) which does not match values in the billions format (e.g. €1.32bn).

Impact

At least 3 national teams return NULL for total_market_value due to this:

  • England: €1.32bn
  • France: €1.45bn
  • Spain: €1.16bn

This likely also affects top clubs whose market values exceed €1bn.

Fix

Extend the regex to include bn and add a corresponding factor of 1e9 in the CASE statement.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions