Redshift now has VARBYTE
type and functions. So you can now convert base64 string to VARBYTE
with TO_VARBYTE(str, 'base64')
. Then you can do stuff with this VARBYTE
, like in my case I needed to see bit 3 of the first byte
SELECT GETBIT(SUBSTRING(TO_VARBYTE(str, 'base64'), 1, 1), 3) FROM ...