`BINARY_QUANTIZE`
Data 360 Query Guide, mirrored from developer.salesforce.com: **Applies to:** ✅ Data 360 SQL ✅ Tableau Hyper API
markdownreferencev1BJ26-BBCWguide: data-cloud-query-guidestage: referencetrust: officialsource: developer.salesforce.comservice: data360interface: sql`BINARY_QUANTIZE`Data 360Data CloudData 360 Query Guide
Mirror of <https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/binary-quantize.html> (Salesforce, Data 360 Query Guide), read 2026-10-23. Salesforce's own page is the authority; this copy exists because that site refuses non-browser readers.
BINARY_QUANTIZE
Applies to: ✅ Data 360 SQL ✅ Tableau Hyper API
Encodes each array element into a single bit, compressing the vector by approximately 32x.
<array>: The vector to quantize (array(real)orarray(double-precision)).
Returns a bytea value where each bit represents whether the corresponding array element is greater than 0 (1) or not (0).
- Elements greater than 0 are encoded as 1, all others (including 0 and negative values) as 0.
- The compression ratio is approximately 32x.
Convert a numeric vector to binary representation.
Returns '0011', where negative values become 0 and positive values become 1.