简体   繁体   English

将数据从BigQuery数据集传输到我自己创建的BigQuery表

[英]Transfering Data From BigQuery Datasets to my Own Created BigQuery Table

I have a project in big query with its all datasets now I want to know how data is coming from firebase to those datasets, And I have created one new own table in bigquery. 我有一个包含所有数据集的大型查询项目,现在我想知道数据是如何从Firebase传递到这些数据集的,并且在bigquery中创建了一个新的自己的表。 How can I push the data from any tables of dataset to my own created table? 如何将数据从数据集的任何表推送到自己创建的表? This query contains all the fields of the dataset table which I want to in my own table. 该查询包含我想要在自己的表中的数据集表的所有字段。

SELECT
user_dim.device_info.device_category
user_dim.device_info.mobile_brand_name  

user_dim.device_info.mobile_model_name  
user_dim.device_info.mobile_marketing_nam
FROM [in_mylo_pregnancy_baby_app_ANDROID.app_events]

Assuming that user_dim is an array, you can use a query such as this one. 假设user_dim是一个数组,则可以使用这样的查询。 Make sure to include the #standardSQL . 确保包括#standardSQL

#standardSQL
SELECT
  user_dim.device_info.device_category
  user_dim.device_info.mobile_brand_name  
  user_dim.device_info.mobile_model_name  
  user_dim.device_info.mobile_marketing_nam
FROM `in_mylo_pregnancy_baby_app_ANDROID.app_events`
CROSS JOIN UNNEST(user_dim) AS user_dim;

Now all of the fields will be top level columns in the resulting table. 现在,所有字段将成为结果表中的顶级列。 If it is not an array, then just select those fields directly: 如果不是数组,则直接选择这些字段:

#standardSQL
SELECT
  user_dim.device_info.device_category
  user_dim.device_info.mobile_brand_name  
  user_dim.device_info.mobile_model_name  
  user_dim.device_info.mobile_marketing_nam
FROM `in_mylo_pregnancy_baby_app_ANDROID.app_events;

Please stop trying to ask multiple questions, since that is not how StackOverflow works. 请停止尝试询问多个问题,因为这不是StackOverflow的工作方式。 See how to ask . 看看怎么问

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM