FROM_ACTIVITY_BITS
All functions > BUSINESS_ACTIVITY > FROM_ACTIVITY_BITS
Returns the activity dates for the given activity bits and date reference.
Syntax
FROM_ACTIVITY_BITS(activity_bits: BIGINT, date_ref: DATE) → `ARRAY<DATE>`
sql
Arguments
Parameter | Type | Required | Description |
---|---|---|---|
activity_bits | BIGINT | Yes | Bit-packed activity representation |
date_ref | DATE | Yes | Reference date to decode activity relative to |
Returns
ARRAY<DATE>
- Array of dates when user was active
Notes
- Decodes bit-packed activity back to array of dates
- Inverse of TO_ACTIVITY_BITS
- Each set bit becomes a date in the result array
- Bit 0 (LSB) maps to reference date
- Bit 1 maps to day before reference date, etc.
- Up to 56 days of history
- Useful for debugging or exporting activity data