将BigQuery表从一个项目导出到另一个项目 [英] Exporting BigQuery table from one project to another

查看:97
本文介绍了将BigQuery表从一个项目导出到另一个项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将存储在Google Cloud Project(Project1)中的BigQuery表(Table1)复制到另一个Google Cloud Project(Project2).该表按TB的顺序排列.这样做的最佳方法是什么,这样我就不必在本地导出表了?我应该将表格从Project1导出到Google Cloud Storage,然后再导出到Project2吗?还是有更好的方法?

I'm trying to copy a BigQuery table (Table1) stored within a Google Cloud Project (Project1) to another Google Cloud Project (Project2). The table is on the order of TBs. What's the best way to do this so that I don't have to export the table locally? Should I export the table from Project1 to Google Cloud Storage, and then to Project2? Or is there a better way?

推荐答案

使用bq命令行工具将表从一个项目复制到另一个项目.您可以查看以下示例命令

Use bq command line tool to copy a table from one project to another. You can have a look at the following sample command

来源:

  • 项目ID : 123456789123
  • 数据集: dataset1
  • :表1
  • projectid: 123456789123
  • dataset: dataset1
  • table: table1

目的地:

  • 项目ID : 0987654321098
  • 数据集: dataset2
  • : table2
  • projectid: 0987654321098
  • dataset: dataset2
  • table: table2

命令:

bq cp 123456789123:dataset1.table1 0987654321098:dataset2.table2

这篇关于将BigQuery表从一个项目导出到另一个项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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