0

I'm using Query which joins external data through EXTERNAL_QUERY() LIKE THIS (this is just example, not actual one)

SELECT 
    ext.program_id,
    SUM(price) AS total_price
FROM a_dataset.purchases pcs
LEFT OUTER JOIN (
    SELECT 
         program_id, 
         version 
    FROM EXTERNAL_QUERY(
        'CONNECTION_INFO',
        'SELECT program_id, version FROM products'
    )
) ext ON pcs.program_id = ext.program_id

This query actually worked at my environment. However, from today, this part ↓

EXTERNAL_QUERY(
        'CONNECTION_INFO',
        'SELECT program_id, version FROM products'
    )

starts to return byte value which looks like encrypted and turns out to show this message

No matching signature for operator = for argument types: STRING, BYTES. Supported signatures: ANY = ANY at [37:9]

'CONNECTION_INFO' refers Cloud SQL, read replica instance of MySQL.

Do you have any ideas how to fix this, or why these return values started to changed ?

2
  • i would use some cast(program_id as string)s to ensure you have the same datatypes
    – rtenha
    Aug 12, 2020 at 3:06
  • Thank you for your comment. yes, that what I finally found as a work around. That works. I'm still wondering why this change has happened... Aug 12, 2020 at 4:15

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.