When would you use NUMERIC, BIGNUMERIC or FLOAT64 in BigQuery, and why does precision matter for financial data?

Quick Overview

This BigQuery interview question asks when to store values as NUMERIC, BIGNUMERIC or FLOAT64 and why the choice matters for money. It tests your understanding of decimal and binary floating-point storage, precision and range limits, and the cost of each type.

When would you use NUMERIC, BIGNUMERIC or FLOAT64 in BigQuery, and why does precision matter for financial data?

Role: Data Scientist

Category: Data Manipulation (SQL/Python)

Difficulty: medium

Interview Round: Other

When would you use `NUMERIC` versus `BIGNUMERIC` versus `FLOAT64` in BigQuery, and why does precision matter for financial data? Cover how each type stores values and what that means for queries that aggregate amounts over many rows. ```hint How a value is stored Ask how each type stores a value such as 0.1: in base 2 or base 10, and with how many digits before and after the decimal point. ``` ```hint Many rows, many runs Think about what a tiny per-row error does when a query sums hundreds of millions of rows on many workers, and whether two runs of the same query must return the same total. ``` ### What a Strong Answer Covers - How `FLOAT64` stores values and why some decimal fractions cannot be represented exactly - The precision, scale and range of `NUMERIC` and `BIGNUMERIC`, and when `NUMERIC` runs out - Why exactness and reproducibility matter for money, reconciliation and audits - The storage, scan cost and speed trade-offs between the types - Workloads where `FLOAT64` is the better choice ### Follow-up Questions - A `NUMERIC` column is multiplied by a `FLOAT64` column. What type is the result, and what does that mean for your totals? - How would you compute daily interest on account balances with a fixed-scale type without losing precision? - When would you store money as `INT64` minor units instead of `NUMERIC`? - How should you round when splitting a total across rows so that the rounded parts still add up to the total?

Overview: This BigQuery interview question asks when to store values as NUMERIC, BIGNUMERIC or FLOAT64 and why the choice matters for money. It tests your understanding of decimal and binary floating-point storage, precision and range limits, and the cost of each type.

PracHub logo
General
Nov 24, 2026
mediumData ScientistOtherData Manipulation (SQL/Python)
0
0

When would you use NUMERIC versus BIGNUMERIC versus FLOAT64 in BigQuery, and why does precision matter for financial data? Cover how each type stores values and what that means for queries that aggregate amounts over many rows.

What a Strong Answer Covers Guidance

  • How FLOAT64 stores values and why some decimal fractions cannot be represented exactly
  • The precision, scale and range of NUMERIC and BIGNUMERIC , and when NUMERIC runs out
  • Why exactness and reproducibility matter for money, reconciliation and audits
  • The storage, scan cost and speed trade-offs between the types
  • Workloads where FLOAT64 is the better choice

Follow-up Questions Guidance

  • A NUMERIC column is multiplied by a FLOAT64 column. What type is the result, and what does that mean for your totals?
  • How would you compute daily interest on account balances with a fixed-scale type without losing precision?
  • When would you store money as INT64 minor units instead of NUMERIC ?
  • How should you round when splitting a total across rows so that the rounded parts still add up to the total?