Google BigQuery

Tabledata: insertAll

Requires authorization

Streams data into BigQuery one record at a time without needing to run a load job. For more information, see streaming data into BigQuery. Try it now.

Access control: For more information, see access control.


HTTP request

POST https://www.googleapis.com/bigquery/v2/projects/projectId/datasets/datasetId/tables/tableId/insertAll


Parameter name Value Description
Path parameters
datasetId string Dataset ID of the destination table.
projectId string Project ID of the destination table.
tableId string Table ID of the destination table.


This request requires authorization with at least one of the following scopes (read more about authentication and authorization).


Request body

In the request body, supply data with the following structure:

  "kind": "bigquery#tableDataInsertAllRequest",
  "rows": [
      "insertId": string,
      "json": {
        (key): (value)
Property name Value Description Notes
kind string The resource type of the response.
rows[] list The rows to insert.
rows[].insertId string [Optional] A unique ID for each row. BigQuery uses this property to detect duplicate insertion requests on a best-effort basis. For more information, see data consistency.
rows[].json nested object [Required] A JSON object that contains a row of data. The object's properties and values must match the destination table's schema.
rows[].json.(key) nested object


If successful, this method returns a response body with the following structure:

  "kind": "bigquery#tableDataInsertAllResponse",
  "insertErrors": [
      "index": unsigned integer,
      "errors": [
          "reason": string,
          "location": string,
          "debugInfo": string,
          "message": string
Property name Value Description Notes
kind string The resource type of the response.
insertErrors[] list An array of errors for rows that were not inserted.
insertErrors[].index unsigned integer The index of the row that error applies to.
insertErrors[].errors[] list Error information for the row indicated by the index property.
insertErrors[].errors[].reason string A short error code that summarizes the error. For help on debugging the specific reason value you receive, see troubleshooting errors.
insertErrors[].errors[].location string Specifies where the error occurred, if present.
insertErrors[].errors[].debugInfo string Debugging information. This property is internal to Google and should not be used.
insertErrors[].errors[].message string A human-readable description of the error.

Try it!

Use the APIs Explorer below to call this method on live data and see the response.