新手 bigquery 如何从 firebase 事件中选择多个参数(模式记录,重复) [英] newbie bigquery how to select multiple parameters from an firebase event (schema record, repeated)

查看:22
本文介绍了新手 bigquery 如何从 firebase 事件中选择多个参数(模式记录,重复)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试从名为SCI_ERROR"的 firebase 事件中选择参数

I am trying to select to parameters from firebase events named "SCI_ERROR"

我是新的 Firebase 和 BigQuery.我观看了 Firebase BigQuery 视频教程.我想也许它有点过时了?我尝试使用我在 stackOverflow 上找到的几个已发布的解决方案.由于错误,我永远无法运行它们.

I am new new Firebase and BigQuery. I watched the Firebase BigQuery video tutorial. I think maybe it is a little out of date? I tried using several posted solutions I found on stackOverflow. I could never run them because of errors.

我认为最佳实践是使用标准查询"语法.

I assume best practice is use the 'standard query' syntax.

我认为我遇到麻烦的地方是我看到的所有示例都表明有一个表 'event_dims' .当我查看架构时,我看到 event_name 和 event_params

I think where I am running into trouble is that all the examples I have seen suggest there is a table 'event_dims' . when I look at the schema I see event_name and event_params

这是我的sql语句

SELECT 
(SELECT value.string_value FROM x
                             WHERE key = 'TITLE') AS level_id,
(SELECT value.string_value FROM x
                             WHERE key = 'url') AS url
FROM `sci.analytics_179015875.events_20180725` ,
  UNNEST(event_params) as x
WHERE event_name = 'SCI_ERROR'

这里是错误

错误:无法解析表名x":数据集名称丢失.

Error: Table name "x" cannot be resolved: dataset name is missing.

提前致谢

安迪

推荐答案

以下为 BigQuery Standard SQL

Below is for BigQuery Standard SQL

#standardSQL
SELECT 
  (SELECT value.string_value FROM UNNEST(event_params) WHERE key = 'TITLE') AS level_id,
  (SELECT value.string_value FROM UNNEST(event_params) WHERE key = 'url') AS url
FROM `sci.analytics_179015875.events_20180725`
WHERE event_name = 'SCI_ERROR'

这篇关于新手 bigquery 如何从 firebase 事件中选择多个参数(模式记录,重复)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆