Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

REGEXP_MATCH in BigQuery Standard SQL

Although the BigQuery Standard SQL documentation mentions the function REGEXP_MATCH[1], it seems to be unavailable when running a query, with the web interface returning:

Error: Function not found: REGEXP_MATCH

What would be an alternative to using it?

[1] https://cloud.google.com/bigquery/sql-reference/functions-and-operators#regexp_match

like image 208
Dirk Avatar asked Jul 25 '16 19:07

Dirk


People also ask

Does BigQuery use standard SQL?

BigQuery supports the Google Standard SQL dialect, but a legacy SQL dialect is also available. If you are new to BigQuery, you should use Google Standard SQL as it supports the broadest range of functionality. For example, features such as DDL and DML statements are only supported using Google Standard SQL.

How can I remove special characters from a string in BigQuery?

If you want to remove a specific character from your String then you can use the Trimming function to do so. Based on the position of the character that you wish to remove there are three kinds of BigQuery String Functions: TRIM (value1[, value2]): It removes all the leading and trailing characters that match value2.

How do you compare two strings in BigQuery?

Comparing strings To do that we can use one of the STRING comparison functions: STARTS_WITH(value1, value2)-> Returns True/False if value1 starts with the substring value2.


1 Answers

what would be an alternative to using it?

You should use REGEXP_CONTAINS

like image 131
Mikhail Berlyant Avatar answered Sep 21 '22 15:09

Mikhail Berlyant