Incorrect BigQuery billing analytics SQL script
Amskee opened this issue · 1 comments
Amskee commented
Issue
BigQuery billing analytics monthly_invoice_costs_credits.sql script uses join to unnest credits and adds them to total cost. This produces duplicate cost rows and incorrect total cost when there is more than one credit applied to the same line item.
Fix
Join needs to be replaced with subquery to prevent duplication of rows which fixes the total cost. I have the fix branch ready but I don't have access to push the branch, do let me know the steps to create a PR