Copy multiple BigQuery tables using the BigQuery Query API

I noticed in the BigQuery Jobs app the API for the Copy task:

https://developers.google.com/bigquery/docs/reference/v2/jobs#resource

there is an entry for "sourceTables":

"copy": {
  "sourceTables": [
    {
      "projectId": string,
      "datasetId": string,
      "tableId": string
    }
  ],

      

However, we can only define a special "destinationTable" and not "destinationTables":

  "destinationTable": {
    "projectId": string,
    "datasetId": string,
    "tableId": string
  },

      

Can the above API be used to copy multiple source tables from one dataset to another dataset?

+3


source to share


1 answer


To create multiple target tables, you need to complete several tasks. If you want to do it all at once, you can use batch request (docs for HTTP API here . Python docs here and Java docs here .



+3


source







All Articles