Google Cloud Platform is a set of modular cloud-based services that allow you to create anything from simple websites to complex applications.
This guide contains everything you need to know how to copy existing an existing table in Google Cloud Big Query.
Download and install Google Cloud SDK by running the following command in your shell or Terminal:
curl https://sdk.cloud.google.com | bash
Restart your shell using this command:
exec -l $SHELL
Authenticate to Google Cloud Platform by running gcloud auth login.
gcloud auth login
Choose your google account and accept the permission.
You will redirect to this page after you accept the permission.
Before you copy the table, make sure you enable your billing first (don’t worry, it won’t charge you for 14 days trial account). To copy a table, run the bq cp command:
bq cp <source_table> <destination_table>
For example, a sample copy command might look like the following:
bq cp dataset.mytable dataset2.mynewtable
You can also copy tables across different projects by specifying the project id in the source and destination path:
bq cp 123456789123:dataset.mytable 0987654321098:dataset2.mynewtable
You can see the results below. From this picture you can determine yourself which one is project id, dataset and table.