BigQery: bytes comparison

16 Views Asked by At

I am working in BigQuery with a data import from a MySQL db. The unique identifiers of the data are in bytes-format. After joining via the identifier, I noticed that BigQuery matches IDs that are not the same (at least from my understanding). Example: 1ypmHnQZQmS14JSDyRD9TQ== and tCZG94FdQYinmdULHGUjZg== When I run

select TO_BASE64(b'tCZG94FdQYinmdULHGUjZg==') != TO_BASE64(b'tCZG94FdQYinmdULHGUjZg==')

It returns true. But I dont know how to make this work in the join condition, as I can't parse the b prefix in this case

0

There are 0 best solutions below