2016-11-11 69 views

回答

5

您不能直接從http或api執行此操作。但是您需要導出到BigQuery,然後您可以查詢數據。我並不清楚BigQuery是如何工作的以及如何在網站上獲取和顯示數據,但您無法在自由計劃中執行此操作。

您可以將戰爭分析數據導出到BLAZE plan的BigQuery中。然後你可以從BigQuery數據庫中查詢。

0

谷歌的BigQuery,獲得項目(在這裏你會寫SQL查詢來獲取數據):https://bigquery.cloud.google.com/dataset/ 谷歌的BigQuery文檔:https://cloud.google.com/bigquery/docs/
快速入門使用Web UI:https://cloud.google.com/bigquery/quickstart-web-ui 的BigQuery提示:UNNEST功能(有助於將陣列數據分割爲單個項目):https://firebase.googleblog.com/2017/03/bigquery-tip-unnest-function.html

----------------------------------- 
#standardSQL 
SELECT 
field_1, field_2, field_N 
FROM `datasetName.tableName`, 
WHERE 
field_1 = 'something' 

--------Examples------------------- 
#standardSQL 
SELECT 
    * 
FROM 
    `bigquery-public-data.samples.natality` 
WHERE 
year = 1969 
AND state = 'CA' 
LIMIT 100; 
----------------------------------- 
#standardSQL 
SELECT 
    repository, 
    actor_attributes.blog, 
    actor_attributes.email 
FROM 
    `bigquery-public-data.samples.github_nested` 
WHERE 
repository.has_downloads = true 
LIMIT 10; 
----------------------------------- 
#standardSQL 
SELECT 
    repository, 
    actor_attributes.blog, 
    actor_attributes.email 
FROM 
    `bigquery-public-data.samples.github_nested` 
WHERE 
repository.language = 'Java' 
LIMIT 10; 
----------------------------------- 
#standardSQL 
SELECT 
    * 
FROM 
    `bigquery-public-data.samples.github_nested` 
WHERE 
repository.language = 'Java' 
LIMIT 10; 
----------------------------------- 
#standardSQL 
SELECT 
    * 
FROM 
    `myProjectDatasetName.app_events_20180118` 
WHERE 
user_dim.geo_info.city = 'Moscow' 
#LIMIT 10; 
----------------------------------- 
#standardSQL 
SELECT 
    * 
FROM 
    `myProjectDatasetName.app_events_20180118` 
WHERE 
user_dim.user_id = '5365621384' 
#LIMIT 10; 
----------------------------------- 
#standardSQL 
SELECT event.name, event.timestamp_micros 
FROM `firebase-analytics-sample-data.android_dataset.app_events_20160607`, 
    UNNEST(event_dim) as event 
WHERE event.name = "round_completed" 
----------------------------------- 
#standardSQL 
SELECT user_dim.user_id, event.name, event.date, event.params, event.timestamp_micros, event.previous_timestamp_micros 
FROM `myProjectDatasetName.app_events_20180118`, 
    UNNEST(event_dim) as event 
WHERE 
user_dim.user_id = '53156651903' 
AND 
event.name = 'test' 
ORDER BY event.timestamp_micros DESC 
----------------------------------- 
#standardSQL 
SELECT 
user_dim.user_id, 
user_dim.geo_info.country, 
user_dim.geo_info.city, 
user_dim.app_info.app_version, 
user_dim.app_info.app_platform, 
event.date, 
event.name, 
event.params, 
event.timestamp_micros, 
event.previous_timestamp_micros 
FROM `myProjectDatasetName.app_events_20180118`, 
UNNEST(event_dim) as event 
WHERE 
user_dim.user_id = '5314561903' 
AND 
event.name = 'test' 
ORDER BY event.timestamp_micros DESC 
----------------------------------- 
相關問題