user3447653
user3447653

Reputation: 4158

Move tables from one project to another in google big query

In our project, we have to move the tables from one pro

As our company grows, at some point we realized that we need to copy tables one by one through API and then delete the old ones. But when it comes to over a hundreds of tables, it's really consumes a lot of time as the copying api is executed as a job and it takes time.

I wonder is there a way in sql or C# to achieve this? Any suggestions would be appreciated.

Upvotes: 1

Views: 757

Answers (1)

Jeremy Condit
Jeremy Condit

Reputation: 7046

Copying a table (and then optionally deleting the original) is the best way to move data from one project to another. You can run many copy jobs in parallel to speed things up.

You mentioned SQL and C# as alternatives:

SQL: You could run a SELECT * query, but you'd pay to scan all your data, and it wouldn't even necessarily be faster. (A query job has much higher parallelism than a copy job, but it also does way more work, because it actually reads and writes all the data instead of copying at the file system layer, so it's hard to predict which one will be faster.)

C#: It doesn't really matter which language you're using--you're welcome to write code against our API from any language using the appropriate client library. But you will not have access to any extra functionality--you will still have to run query jobs or copy jobs to move data.

Upvotes: 2

Related Questions