简体   繁体   English

如何将数据从 BigQuery 移动到 BigQuery 中的同一数据库但架构不同?

[英]How can I move data from BigQuery to same database in BigQuery but different schema?

I am trying to move the data from Financial Schema tables to Looker_Scratch Schema tables.我正在尝试将数据从财务架构表移动到 Looker_Scratch 架构表。

There are a few different ways to do this:有几种不同的方法可以做到这一点:

  1. Using the UI follow the instructions in the documentation for copying a single source table .使用 UI 按照文档中的说明复制单个源表
  2. Utilize the table snapshot function as described here: https://cloud.google.com/bigquery/docs/table-snapshots-create使用表快照 function,如下所述: https://cloud.google.com/bigquery/docs/table-snapshots-create
  3. Create a view to in the scratch dataset that points to the original.在临时数据集中创建一个指向原始数据集的视图。

The benefit to the snapshot is that it would be that it stores less data on disc than a full copy, however in both scenarios one and two above the data would become stale unless you put some kind of scheduled query or process behind it to refresh.快照的好处是它在磁盘上存储的数据比完整副本少,但是在上述第一种和第二种情况下,除非您在其后面放置某种预定查询或进程以刷新,否则数据将变得陈旧。 The view method would allow you to have the data be up to date as of the execution, this could present permissions issues so you may also want to look into authorized views. view 方法允许您在执行时让数据保持最新,这可能会出现权限问题,因此您可能还想查看授权视图。

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

相关问题 如何将多个文件(相同模式)从 LOCAL 加载到 BigQuery 中的表中? - How to load multiple files (same schema) from LOCAL into a table in BigQuery? SQL/BigQuery 如何对这些数据进行会话? - SQL/BigQuery how can I sessionize this data? BigQuery:如何使用应用于同一列的三个不同过滤器获取数据? - BigQuery: How to get data with three different filters applied to same column? BigQuery Standard SQL - 查询具有相同架构的 3 个不同表。 如何添加每行来自哪个表的列? - BigQuery Standard SQL - querying 3 different tables with same schema. How to add column with what table each row is from? bigquery合并来自不同表的相同列 - bigquery merging same columns from different tables 在 BigQuery 中将不同行的数据合并为一个 - Concat data from different rows into one in BigQuery 如何筛选包含数组数据的 BigQuery 数据集? - How can I filter a BigQuery dataset that contains array data? 如何减少 BigQuery 在查询期间扫描的数据量? - How can I reduce the amount of data scanned by BigQuery during a query? 如何将聚合函数应用于从 Google BigQuery 中的 JSON 提取的数据? - How can I apply aggregate functions to data extracted from JSON in Google BigQuery? 如何从 BigQuery SQL 中的纪元时间中提取日期 - How can I extract date from epoch time in BigQuery SQL
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM