gcl No matching signature for operator ~ for argument types: STRING. Supported signatures: ~(INT64)

When I try the following query in google cloud log analytics

SELECT
   http_request.user_agent,count(*) as num
FROM
  `tympa-health-production.global._Default._AllLogs`
WHERE
  http_request.user_agent as string =~ "^google.*"

I get

No matching signature for operator ~ for argument types: STRING. Supported signatures: ~(INT64)

also tried

cast(http_request.user_agent as string) =~ “^google.*”

any ideas?

Leave a Comment