Stay organized with collections
Save and categorize content based on your preferences.
This page provides information on how to handle blockchain UINT256 data types in Blockchain Analytics.
Lossless columns
Blockchain Analytics does not support UINT256 NUMERIC columns, but some blockchain data types have numerical precision up to UINT256.
In order to preserve the numerical precision, Blockchain Analytics datasets
presents UINT256 values in two separate columns:
An UINT128 NUMERIC column with potential loss of precision.
A STRING column containing the full decimal value in string form. The string
columns are marked with the _lossless prefix.
BigQuery User-Defined Functions (UDF)
Google Cloud hosts a Blockchain Analytics utility library that contains UDF for handling UINT256 computations and aggregations.
The following UDFs are relevant for UINT256 computation.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003ePre-GA products and features, like this one, are subject to the "Pre-GA Offerings Terms" and are available "as is" with potential limited support.\u003c/p\u003e\n"],["\u003cp\u003eBlockchain Analytics handles UINT256 data types by providing both a UINT128 NUMERIC column with potential precision loss and a \u003ccode\u003e_lossless\u003c/code\u003e prefixed STRING column for the full decimal value.\u003c/p\u003e\n"],["\u003cp\u003eGoogle Cloud provides a Blockchain Analytics utility library with User-Defined Functions (UDFs) like \u003ccode\u003ebignumber_add\u003c/code\u003e, \u003ccode\u003ebignumber_sub\u003c/code\u003e, \u003ccode\u003ebignumber_mul\u003c/code\u003e, \u003ccode\u003ebignumber_div\u003c/code\u003e, \u003ccode\u003ebignumber_sum\u003c/code\u003e, and \u003ccode\u003ebignumber_avg\u003c/code\u003e for UINT256 computations.\u003c/p\u003e\n"],["\u003cp\u003eA sample query is provided that demonstrates how to use UDFs and the \u003ccode\u003e_lossless\u003c/code\u003e column to work with UINT256 values in BigQuery, specifically for summing and dividing withdrawals.\u003c/p\u003e\n"]]],[],null,[]]