younifyd
Menu

Bigquery.jobs.insert

Starts a new asynchronous job. Requires the Can View project role.

POST/projects/{projectId}/jobs

Use it in a workflow

  1. Add a step and choose the BigQuery connector.
  2. Pick the Bigquery.jobs.insert action (under jobs).
  3. Fill in the fields below, then reference the result from later steps as {{bigqueryJobsInsert.response.data}}.

Request

Path parameters

projectIdstringrequired

Project ID of the project that will be billed for the job

Query parameters

altstring

Data format for the response.

One ofjson

fieldsstring

Selector specifying which fields to include in a partial response.

keystring

API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.

oauth_tokenstring

OAuth 2.0 token for the current user.

prettyPrintboolean

Returns response with indentations and line breaks.

quotaUserstring

An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

userIpstring

Deprecated. Please use quotaUser instead.

Request body

Enter the body as JSON in the step's Body field.

configurationobject
copyobject8 fields
dryRunboolean

[Optional] If set, don't actually run this job. A valid query will return a mostly empty response with some processing statistics, while an invalid query will return the same error it would if it wasn't a dry run. Behavior of non-query jobs is undefined.

extractobject9 fields
jobTimeoutMsstring (int64)

[Optional] Job timeout in milliseconds. If this time limit is exceeded, BigQuery may attempt to terminate the job.

jobTypestring

[Output-only] The type of the job. Can be QUERY, LOAD, EXTRACT, COPY or UNKNOWN.

labelsobject

The labels associated with this job. You can use these to organize and group your jobs. Label keys and values can be no longer than 63 characters, can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. Label values are optional. Label keys must start with a letter and each label in the list must have a different key.

loadobject34 fields
queryobject25 fields
etagstring

[Output-only] A hash of this resource.

idstring

[Output-only] Opaque ID field of the job

jobReferenceobject
jobIdstring

[Required] The ID of the job. The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), or dashes (-). The maximum length is 1,024 characters.

locationstring

The geographic location of the job. See details at https://cloud.google.com/bigquery/docs/locations#specifying_your_location.

projectIdstring

[Required] The ID of the project containing this job.

kindstring

[Output-only] The type of the resource.

Default "bigquery#job"

selfLinkstring

[Output-only] A URL that can be used to access this resource again.

statisticsobject
completionRationumber (double)

[TrustedTester] [Output-only] Job progress (0.0 -> 1.0) for LOAD and EXTRACT jobs.

copyobject2 fields
creationTimestring (int64)

[Output-only] Creation time of this job, in milliseconds since the epoch. This field will be present on all jobs.

dataMaskingStatisticsobject1 fields
endTimestring (int64)

[Output-only] End time of this job, in milliseconds since the epoch. This field will be present whenever a job is in the DONE state.

extractobject2 fields
loadobject5 fields
numChildJobsstring (int64)

[Output-only] Number of child jobs executed.

parentJobIdstring

[Output-only] If this is a child job, the id of the parent.

queryobject33 fields
quotaDefermentsarray<string>

[Output-only] Quotas which delayed this job's start time.

reservationUsagearray<object>2 fields

[Output-only] Job resource usage breakdown by reservation.

reservation_idstring

[Output-only] Name of the primary reservation assigned to this job. Note that this could be different than reservations reported in the reservation usage field if parent reservations were used to execute this job.

rowLevelSecurityStatisticsobject1 fields
scriptStatisticsobject2 fields
sessionInfoobject1 fields
startTimestring (int64)

[Output-only] Start time of this job, in milliseconds since the epoch. This field will be present when the job transitions from the PENDING state to either RUNNING or DONE.

totalBytesProcessedstring (int64)

[Output-only] [Deprecated] Use the bytes processed in the query statistics instead.

totalSlotMsstring (int64)

[Output-only] Slot-milliseconds for the job.

transactionInfoobject1 fields
statusobject
errorResultobject4 fields
errorsarray<object>4 fields

[Output-only] The first errors encountered during the running of the job. The final message includes the number of errors that caused the process to stop. Errors here do not necessarily mean that the job has completed or was unsuccessful.

statestring

[Output-only] Running state of the job.

user_emailstring

[Output-only] Email address of the user who ran the job.

json
{
  "configuration": {
    "copy": {
      "createDisposition": "string",
      "destinationEncryptionConfiguration": {
        "kmsKeyName": "string"
      },
      "destinationExpirationTime": null,
      "destinationTable": {
        "datasetId": "string",
        "projectId": "string",
        "tableId": "string"
      },
      "operationType": "string",
      "sourceTable": {
        "datasetId": "string",
        "projectId": "string",
        "tableId": "string"
      },
      "sourceTables": [
        {
          "datasetId": "string",
          "projectId": "string",
          "tableId": "string"
        }
      ],
      "writeDisposition": "string"
    },
    "dryRun": false,
    "extract": {
      "compression": "string",
      "destinationFormat": "string",
      "destinationUri": "string",
      "destinationUris": [
        "string"
      ],
      "fieldDelimiter": "string",
      "printHeader": true,
      "sourceModel": {
        "datasetId": "string",
        "modelId": "string",
        "projectId": "string"
      },
      "sourceTable": {
        "datasetId": "string",
        "projectId": "string",
        "tableId": "string"
      },
      "useAvroLogicalTypes": false
    },
    "jobTimeoutMs": "string",
    "jobType": "string",
    "labels": {},
    "load": {
      "allowJaggedRows": false,
      "allowQuotedNewlines": false,
      "autodetect": false,
      "clustering": {
        "fields": [
          "string"
        ]
      },
      "connectionProperties": [
        {
          "key": "string",
          "value": "string"
        }
      ],
      "createDisposition": "string",
      "createSession": false,
      "decimalTargetTypes": [
        "string"
      ],
      "destinationEncryptionConfiguration": {
        "kmsKeyName": "string"
      },
      "destinationTable": {
        "datasetId": "string",
        "projectId": "string",
        "tableId": "string"
      },
      "destinationTableProperties": {
        "description": "string",
        "expirationTime": "2025-01-01T00:00:00Z",
        "friendlyName": "string",
        "labels": {}
      },
      "encoding": "string"
    },
    "query": {
      "allowLargeResults": false,
      "clustering": {
        "fields": [
          "string"
        ]
      },
      "connectionProperties": [
        {
          "key": "string",
          "value": "string"
        }
      ],
      "continuous": false,
      "createDisposition": "string",
      "createSession": false,
      "defaultDataset": {
        "datasetId": "string",
        "projectId": "string"
      },
      "destinationEncryptionConfiguration": {
        "kmsKeyName": "string"
      },
      "destinationTable": {
        "datasetId": "string",
        "projectId": "string",
        "tableId": "string"
      },
      "flattenResults": true,
      "maximumBillingTier": 1,
      "maximumBytesBilled": "string"
    }
  },
  "etag": "string",
  "id": "string",
  "jobReference": {
    "jobId": "string",
    "location": "string",
    "projectId": "string"
  },
  "kind": "bigquery#job",
  "selfLink": "string",
  "statistics": {
    "completionRatio": 0,
    "copy": {
      "copied_logical_bytes": "string",
      "copied_rows": "string"
    },
    "creationTime": "string",
    "dataMaskingStatistics": {
      "dataMaskingApplied": false
    },
    "endTime": "string",
    "extract": {
      "destinationUriFileCounts": [
        "string"
      ],
      "inputBytes": "string"
    },
    "load": {
      "badRecords": "string",
      "inputFileBytes": "string",
      "inputFiles": "string",
      "outputBytes": "string",
      "outputRows": "string"
    },
    "numChildJobs": "string",
    "parentJobId": "string",
    "query": {
      "biEngineStatistics": {
        "accelerationMode": "",
        "biEngineMode": "",
        "biEngineReasons": [
          {
            "code": "",
            "message": ""
          }
        ]
      },
      "billingTier": 0,
      "cacheHit": false,
      "ddlAffectedRowAccessPolicyCount": "string",
      "ddlDestinationTable": {
        "datasetId": "string",
        "projectId": "string",
        "tableId": "string"
      },
      "ddlOperationPerformed": "string",
      "ddlTargetDataset": {
        "datasetId": "string",
        "projectId": "string"
      },
      "ddlTargetRoutine": {
        "datasetId": "string",
        "projectId": "string",
        "routineId": "string"
      },
      "ddlTargetRowAccessPolicy": {
        "datasetId": "string",
        "policyId": "string",
        "projectId": "string",
        "tableId": "string"
      },
      "ddlTargetTable": {
        "datasetId": "string",
        "projectId": "string",
        "tableId": "string"
      },
      "dmlStats": {
        "deletedRowCount": "string",
        "insertedRowCount": "string",
        "updatedRowCount": "string"
      },
      "estimatedBytesProcessed": "string"
    },
    "quotaDeferments": [
      "string"
    ],
    "reservationUsage": [
      {
        "name": "string",
        "slotMs": "string"
      }
    ]
  },
  "status": {
    "errorResult": {
      "debugInfo": "string",
      "location": "string",
      "message": "string",
      "reason": "string"
    },
    "errors": [
      {
        "debugInfo": "string",
        "location": "string",
        "message": "string",
        "reason": "string"
      }
    ],
    "state": "string"
  },
  "user_email": "string"
}

Response

Returns 200 with an object. Read it in later steps with {{bigqueryJobsInsert.response.data.<field>}}.

configurationobject
copyobject8 fields
dryRunboolean

[Optional] If set, don't actually run this job. A valid query will return a mostly empty response with some processing statistics, while an invalid query will return the same error it would if it wasn't a dry run. Behavior of non-query jobs is undefined.

extractobject9 fields
jobTimeoutMsstring (int64)

[Optional] Job timeout in milliseconds. If this time limit is exceeded, BigQuery may attempt to terminate the job.

jobTypestring

[Output-only] The type of the job. Can be QUERY, LOAD, EXTRACT, COPY or UNKNOWN.

labelsobject

The labels associated with this job. You can use these to organize and group your jobs. Label keys and values can be no longer than 63 characters, can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. Label values are optional. Label keys must start with a letter and each label in the list must have a different key.

loadobject34 fields
queryobject25 fields
etagstring

[Output-only] A hash of this resource.

idstring

[Output-only] Opaque ID field of the job

jobReferenceobject
jobIdstring

[Required] The ID of the job. The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), or dashes (-). The maximum length is 1,024 characters.

locationstring

The geographic location of the job. See details at https://cloud.google.com/bigquery/docs/locations#specifying_your_location.

projectIdstring

[Required] The ID of the project containing this job.

kindstring

[Output-only] The type of the resource.

Default "bigquery#job"

selfLinkstring

[Output-only] A URL that can be used to access this resource again.

statisticsobject
completionRationumber (double)

[TrustedTester] [Output-only] Job progress (0.0 -> 1.0) for LOAD and EXTRACT jobs.

copyobject2 fields
creationTimestring (int64)

[Output-only] Creation time of this job, in milliseconds since the epoch. This field will be present on all jobs.

dataMaskingStatisticsobject1 fields
endTimestring (int64)

[Output-only] End time of this job, in milliseconds since the epoch. This field will be present whenever a job is in the DONE state.

extractobject2 fields
loadobject5 fields
numChildJobsstring (int64)

[Output-only] Number of child jobs executed.

parentJobIdstring

[Output-only] If this is a child job, the id of the parent.

queryobject33 fields
quotaDefermentsarray<string>

[Output-only] Quotas which delayed this job's start time.

reservationUsagearray<object>2 fields

[Output-only] Job resource usage breakdown by reservation.

reservation_idstring

[Output-only] Name of the primary reservation assigned to this job. Note that this could be different than reservations reported in the reservation usage field if parent reservations were used to execute this job.

rowLevelSecurityStatisticsobject1 fields
scriptStatisticsobject2 fields
sessionInfoobject1 fields
startTimestring (int64)

[Output-only] Start time of this job, in milliseconds since the epoch. This field will be present when the job transitions from the PENDING state to either RUNNING or DONE.

totalBytesProcessedstring (int64)

[Output-only] [Deprecated] Use the bytes processed in the query statistics instead.

totalSlotMsstring (int64)

[Output-only] Slot-milliseconds for the job.

transactionInfoobject1 fields
statusobject
errorResultobject4 fields
errorsarray<object>4 fields

[Output-only] The first errors encountered during the running of the job. The final message includes the number of errors that caused the process to stop. Errors here do not necessarily mean that the job has completed or was unsuccessful.

statestring

[Output-only] Running state of the job.

user_emailstring

[Output-only] Email address of the user who ran the job.

json
{
  "configuration": {
    "copy": {
      "createDisposition": "string",
      "destinationEncryptionConfiguration": {
        "kmsKeyName": "string"
      },
      "destinationExpirationTime": null,
      "destinationTable": {
        "datasetId": "string",
        "projectId": "string",
        "tableId": "string"
      },
      "operationType": "string",
      "sourceTable": {
        "datasetId": "string",
        "projectId": "string",
        "tableId": "string"
      },
      "sourceTables": [
        {
          "datasetId": "string",
          "projectId": "string",
          "tableId": "string"
        }
      ],
      "writeDisposition": "string"
    },
    "dryRun": false,
    "extract": {
      "compression": "string",
      "destinationFormat": "string",
      "destinationUri": "string",
      "destinationUris": [
        "string"
      ],
      "fieldDelimiter": "string",
      "printHeader": true,
      "sourceModel": {
        "datasetId": "string",
        "modelId": "string",
        "projectId": "string"
      },
      "sourceTable": {
        "datasetId": "string",
        "projectId": "string",
        "tableId": "string"
      },
      "useAvroLogicalTypes": false
    },
    "jobTimeoutMs": "string",
    "jobType": "string",
    "labels": {},
    "load": {
      "allowJaggedRows": false,
      "allowQuotedNewlines": false,
      "autodetect": false,
      "clustering": {
        "fields": [
          "string"
        ]
      },
      "connectionProperties": [
        {
          "key": "string",
          "value": "string"
        }
      ],
      "createDisposition": "string",
      "createSession": false,
      "decimalTargetTypes": [
        "string"
      ],
      "destinationEncryptionConfiguration": {
        "kmsKeyName": "string"
      },
      "destinationTable": {
        "datasetId": "string",
        "projectId": "string",
        "tableId": "string"
      },
      "destinationTableProperties": {
        "description": "string",
        "expirationTime": "2025-01-01T00:00:00Z",
        "friendlyName": "string",
        "labels": {}
      },
      "encoding": "string"
    },
    "query": {
      "allowLargeResults": false,
      "clustering": {
        "fields": [
          "string"
        ]
      },
      "connectionProperties": [
        {
          "key": "string",
          "value": "string"
        }
      ],
      "continuous": false,
      "createDisposition": "string",
      "createSession": false,
      "defaultDataset": {
        "datasetId": "string",
        "projectId": "string"
      },
      "destinationEncryptionConfiguration": {
        "kmsKeyName": "string"
      },
      "destinationTable": {
        "datasetId": "string",
        "projectId": "string",
        "tableId": "string"
      },
      "flattenResults": true,
      "maximumBillingTier": 1,
      "maximumBytesBilled": "string"
    }
  },
  "etag": "string",
  "id": "string",
  "jobReference": {
    "jobId": "string",
    "location": "string",
    "projectId": "string"
  },
  "kind": "bigquery#job",
  "selfLink": "string",
  "statistics": {
    "completionRatio": 0,
    "copy": {
      "copied_logical_bytes": "string",
      "copied_rows": "string"
    },
    "creationTime": "string",
    "dataMaskingStatistics": {
      "dataMaskingApplied": false
    },
    "endTime": "string",
    "extract": {
      "destinationUriFileCounts": [
        "string"
      ],
      "inputBytes": "string"
    },
    "load": {
      "badRecords": "string",
      "inputFileBytes": "string",
      "inputFiles": "string",
      "outputBytes": "string",
      "outputRows": "string"
    },
    "numChildJobs": "string",
    "parentJobId": "string",
    "query": {
      "biEngineStatistics": {
        "accelerationMode": "",
        "biEngineMode": "",
        "biEngineReasons": [
          {
            "code": "",
            "message": ""
          }
        ]
      },
      "billingTier": 0,
      "cacheHit": false,
      "ddlAffectedRowAccessPolicyCount": "string",
      "ddlDestinationTable": {
        "datasetId": "string",
        "projectId": "string",
        "tableId": "string"
      },
      "ddlOperationPerformed": "string",
      "ddlTargetDataset": {
        "datasetId": "string",
        "projectId": "string"
      },
      "ddlTargetRoutine": {
        "datasetId": "string",
        "projectId": "string",
        "routineId": "string"
      },
      "ddlTargetRowAccessPolicy": {
        "datasetId": "string",
        "policyId": "string",
        "projectId": "string",
        "tableId": "string"
      },
      "ddlTargetTable": {
        "datasetId": "string",
        "projectId": "string",
        "tableId": "string"
      },
      "dmlStats": {
        "deletedRowCount": "string",
        "insertedRowCount": "string",
        "updatedRowCount": "string"
      },
      "estimatedBytesProcessed": "string"
    },
    "quotaDeferments": [
      "string"
    ],
    "reservationUsage": [
      {
        "name": "string",
        "slotMs": "string"
      }
    ]
  },
  "status": {
    "errorResult": {
      "debugInfo": "string",
      "location": "string",
      "message": "string",
      "reason": "string"
    },
    "errors": [
      {
        "debugInfo": "string",
        "location": "string",
        "message": "string",
        "reason": "string"
      }
    ],
    "state": "string"
  },
  "user_email": "string"
}

Need more? See the BigQuery guide for connection setup and behaviour shared by every action.