0

我们使用 json_extract 为 BigQuery 中的数据提取字段我可以轻松地按 event_type 过滤,但是如何按从 JSON 中提取的标题进行过滤?例如:仅包含“facebook”一词的标题

如果我通过操作查询它完美地工作:

SELECT timestamp,
operation as event_type,
json_extract(data, '$.title') as title,
json_extract(data, '$.duration') as duration,
FROM `videos` 
WHERE (operation = "CREATE") ORDER BY timestamp ASC
4

1 回答 1

2

剂量这个工作?

SELECT timestamp,
operation as event_type,
json_extract(data, '$.title') as title,
json_extract(data, '$.duration') as duration,
FROM `videos` 
WHERE operation = "CREATE"
  and json_value(data, '$.title') like '%facebook%'
ORDER BY timestamp ASC
于 2021-05-26T06:12:58.793 回答