Differences Between FLOAT (FLOAT64) vs NUMERIC Data Types in BigQuery Explained

June 04, 2024 at 7:27:03 AM

TL;DR FLOAT (FLOAT64) is a double-precision floating-point number that can express a large array of values, uses 8 logical bytes, and offers faster calculations but may yield rounding errors. It suits queries tolerating small differences and scientific calculations. NUMERIC is a fixed-point decimal type with up to 38 digits and 9 decimal places, using 16 logical bytes, providing exact storage without rounding errors, ideal for finance or precise calculations.

Differences Between FLOAT (FLOAT64) vs NUMERIC Data Types in BigQuery Explained

In BigQuery SQL, FLOAT (FLOAT64) and NUMERIC data types both handle decimals but differ in precision and performance.

FLOAT (FLOAT64)

  • Type: Double-precision floating-point number.
  • Pros:
    • Can represent a wide range of values, both large and very small.
    • Uses 8 logical bytes.
    • Faster calculations.
    • Supports literals for NaN, minus/plus infinity.
  • Cons:
    • Approximate data type, leading to potential rounding errors.
  • Use Cases:
    • Suitable for queries tolerating small differences (e.g., average chocolate consumption per capita).
    • Ideal for scientific calculations involving very large numbers.

NUMERIC

  • Type: Fixed-point decimal type, up to 38 digits and 9 decimal places (alias for DECIMAL).
  • Pros:
    • Exact storage with no rounding errors.
  • Cons:
    • Uses 16 logical bytes.
    • Slower calculations.
  • Use Cases:
    • Essential where precision is critical (e.g., financial calculations, space missions).

Additional Note

  • BIGNUMERIC (BIGDECIMAL): For an even larger range, using 32 logical bytes.

Have more questions on this topic? Ask our AI assistant for in-depth insights.

Read more from sources 👇

Constantin Lungu
Constantin Lungu

Top Creator

Top BigQuery Creator

Constantin Lungu is a Top BigQuery Creator. Part of Swipe Insight Select, a curated list of top creators.

Top BigQuery Creator
- FLOAT (FLOAT64) is a double-precision floating-point number that can express a large array of values, uses 8 logical byt... Visit Source Open external source URL

The Only Digital Marketing Feed You'll Ever Need.

Stay informed your way. Tailored updates when and how you want them. 100% Free.

10,000+ Users

500+ Sources

1000+ Tools

Or

Related Posts

Google Cloud Code Extension Adds BigQuery Support in VS Code

Google Cloud Code Extension Adds BigQuery Support in VS Code

Google Cloud
Google Cloud

Official Source

Official Source

Google Cloud is a Official Source. The source has been verified by Swipe Insight team.

Official Source
BigQuery Introduces Commercial Data Sharing via Cloud Marketplace

BigQuery Introduces Commercial Data Sharing via Cloud Marketplace

Google Cloud
Google Cloud

Official Source

Official Source

Google Cloud is a Official Source. The source has been verified by Swipe Insight team.

Official Source
Google Sheets Integrates BigQuery Saved Queries

Google Sheets Integrates BigQuery Saved Queries

Google
Google

Official Source

Official Source

Google is a Official Source. The source has been verified by Swipe Insight team.

Official Source
Top-Notch Google Ads Audit Tool

Top-Notch Google Ads Audit Tool

Featured
BigQuery Expands Search Index Capabilities with INT64 and TIMESTAMP Support

BigQuery Expands Search Index Capabilities with INT64 and TIMESTAMP Support

Google Cloud
Google Cloud

Official Source

Official Source

Google Cloud is a Official Source. The source has been verified by Swipe Insight team.

Official Source
Google Ends Free Access to Gemini in BigQuery, Announces Paid Plans

Google Ends Free Access to Gemini in BigQuery, Announces Paid Plans

Google Cloud
Google Cloud

Official Source

Official Source

Google Cloud is a Official Source. The source has been verified by Swipe Insight team.

Official Source
Google Cloud Enhances Looker with Major User Experience Updates

Google Cloud Enhances Looker with Major User Experience Updates

Sean Zinsmeister
Sean Zinsmeister

Official Source

Official Source

Sean Zinsmeister is a Official Source. The source has been verified by Swipe Insight team.

Official Source
BigQuery Launches Gemini-Enhanced SQL Translation Features

BigQuery Launches Gemini-Enhanced SQL Translation Features

Google Cloud
Google Cloud

Official Source

Official Source

Google Cloud is a Official Source. The source has been verified by Swipe Insight team.

Official Source

Related Tools

Marketing Auditor logo

Marketing Auditor

Verified Tool

Verified Tool

Marketing Auditor is a Verified Tool. Want to get this badge? Contact us.

Verified Tool

Automated audits for Google Ads and Analytics.

Get Featured Here

Showcase your tool in this list.

Contact Us
Databricks logo

Databricks

Generative AI-powered data intelligence platform

Data Engineering
GA4 SQL logo

GA4 SQL

Verified Tool

Verified Tool

GA4 SQL is a Verified Tool. Want to get this badge? Contact us.

Verified Tool

Generate GA4 BigQuery queries easily

Data Analysis
TapClicks logo

TapClicks

Automated marketing solutions powered by your data

Data Engineering
Stitch logo

Stitch

Automated cloud data pipelines, no coding needed

Data Engineering
Akkio logo

Akkio

AI-powered analytics for agencies

Data Analysis
NinjaCat logo

NinjaCat

AI-powered marketing data and analytics platform

Reporting
Funnel logo

Funnel

Aggregate and analyze marketing data seamlessly

Reporting
Fivetran logo

Fivetran

Effortlessly centralize and move data from any source

Data Engineering
Power My Analytics logo

Power My Analytics

Automate and integrate your marketing data

Reporting

Get Featured Here

Showcase your tool in this list.

Contact Us