How to Query Multiple Firebase Projects in Bigquery?

血红的双手。 提交于 2020-01-22 02:25:22

问题


How to put Select query to pull data from Multiple Firebase Projects

How to query abc project & xyz project in a single query. At present i am putting two queries to extract data from Project abc & xyz & its dataset tables.

Querying abc Project

SELECT app_info.id,event_date,app_info.version,
count(*) as sessions,
count( distinct user_pseudo_id ) as uniqueusers 
FROM `abc-1075.analytics_151541058.events_*`
where event_name='session_start' and 
_TABLE_SUFFIX BETWEEN '20190901' AND '20190931' group by 1,2,3

Querying xyz Project

SELECT app_info.id,event_date,app_info.version,
count(*) as sessions,
count( distinct user_pseudo_id ) as uniqueusers 
FROM `xyz-1056.analytics_151414092.events_*`
where event_name='session_start' and 
_TABLE_SUFFIX BETWEEN '20190901' AND '20190931' group by 1,2,3

Expected results from Single Query from two Firebase Projects

Pls. Note: com.abc data is pulled from project abc datasets tables com.xyz data is pulled from project xyz datasets tables.

id version event_date sessions uniqueusers

com.abc 6.6 01-Sep-19 45745 17098

com.xyz 6.7 01-Sep-19 42372 12087

How to put Select query to pull data from Multiple Firebase Projects... Pls Help

来源:https://stackoverflow.com/questions/57951487/how-to-query-multiple-firebase-projects-in-bigquery

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!