Bigquery bq cp examples
Use the "cp" command to copy tables, create table snapshots, or restore table snapshots
bq cp myDataset.SourceTable myDataset.BackupTable
To copy across projects
bq cp project:myDataset.SourceTable project:myDataset.BackupTable
Time Travel copy
bq cp myDataset.myTable@1632170743 myDataset.myTableClone
To overwrite the target table
bq cp --force=true myDataset.SourceTable myDataset.BackupTable
To create a snapshot backup table
bq cp --snapshot myDataset.SourceTable myDataset.BackupTable
Optional Arguments:
- --append_table={true|false} or -a={true|false}
- --destination_kms_key=KEY
- --expiration=SECONDS
- --force={true|false} or -f={true|false}
- --no_clobber={true|false} or -n={true|false}
- --restore
- --snapshot
Post Comment