Domanda

I have a query that is supposed to find the occurence of a special character in UTF8.

That is my query:

SELECT key FROM workspace.table1 WHERE key CONTAINS '\u266D'

However, I get the error message "Invalid string literal".

How can I properly use UTF8 characters in my query?

È stato utile?

Soluzione

BigQuery accepts UTF8 encoded input, so you should be able to pass the utf character in your query directly, rather than using the hex code:

SELECT count(*) from publicdata:samples.wikipedia where
title contains '♭'

returns 651

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top