Hide
BigQuery

Jobs: list

Requires authorization

Lists all jobs that you started in the specified project. Job information is available for a six month period after creation. The job list is sorted in reverse chronological order, by job creation time. Requires the Can View project role, or the Is Owner project role if you set the allUsers property. Try it now.

Access control: To call this method, you must have one of the following project roles:

  • Can View access to list all jobs you started for that project.
  • Is Owner access to list all jobs run on the project, including jobs run by other project users.

For more information, see access control.

Request

HTTP request

GET https://www.googleapis.com/bigquery/v2/projects/projectId/jobs

Parameters

Parameter name Value Description
Path parameters
projectId string Project ID of the jobs to list
Optional query parameters
allUsers boolean Whether to display jobs owned by all users in the project. Default false
maxResults unsigned integer Maximum number of results to return
pageToken string Page token, returned by a previous call, to request the next page of results
projection string Restrict information returned to a set of selected fields

Acceptable values are:
  • "full": Includes all job data
  • "minimal": Does not include the job configuration
stateFilter string Filter for job state

Acceptable values are:
  • "done": Finished jobs
  • "pending": Pending jobs
  • "running": Running jobs

Authorization

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

Scope
https://www.googleapis.com/auth/bigquery
https://www.googleapis.com/auth/cloud-platform
https://www.googleapis.com/auth/cloud-platform.read-only

Request body

Do not supply a request body with this method.

Response

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

{
  "kind": "bigquery#jobList",
  "etag": etag,
  "nextPageToken": string,
  "jobs": [
    {
      "id": string,
      "kind": "bigquery#job",
      "jobReference": {
        "projectId": string,
        "jobId": string
      },
      "state": string,
      "errorResult": {
        "reason": string,
        "location": string,
        "debugInfo": string,
        "message": string
      },
      "statistics": {
        "creationTime": long,
        "startTime": long,
        "endTime": long,
        "totalBytesProcessed": long,
        "query": {
          "totalBytesProcessed": long,
          "cacheHit": boolean
        },
        "load": {
          "inputFiles": long,
          "inputFileBytes": long,
          "outputRows": long,
          "outputBytes": long
        },
        "extract": {
          "destinationUriFileCounts": [
            long
          ]
        }
      },
      "configuration": {
        "query": {
          "query": string,
          "destinationTable": {
            "projectId": string,
            "datasetId": string,
            "tableId": string
          },
          "tableDefinitions": {
            (key): {
              "sourceUris": [
                string
              ],
              "schema": {
                "fields": [
                  {
                    "name": string,
                    "type": string,
                    "mode": string,
                    "fields": [
                      (TableFieldSchema)
                    ],
                    "description": string
                  }
                ]
              },
              "sourceFormat": string,
              "maxBadRecords": integer,
              "ignoreUnknownValues": boolean,
              "compression": string,
              "csvOptions": {
                "fieldDelimiter": string,
                "skipLeadingRows": integer,
                "quote": string,
                "allowQuotedNewlines": boolean,
                "allowJaggedRows": boolean,
                "encoding": string
              }
            }
          },
          "userDefinedFunctionResources": [
            {
              "resourceUri": string,
              "inlineCode": string
            }
          ],
          "createDisposition": string,
          "writeDisposition": string,
          "defaultDataset": {
            "datasetId": string,
            "projectId": string
          },
          "priority": string,
          "preserveNulls": boolean,
          "allowLargeResults": boolean,
          "useQueryCache": boolean,
          "flattenResults": boolean
        },
        "load": {
          "sourceUris": [
            string
          ],
          "schema": {
            "fields": [
              {
                "name": string,
                "type": string,
                "mode": string,
                "fields": [
                  (TableFieldSchema)
                ],
                "description": string
              }
            ]
          },
          "destinationTable": {
            "projectId": string,
            "datasetId": string,
            "tableId": string
          },
          "createDisposition": string,
          "writeDisposition": string,
          "fieldDelimiter": string,
          "skipLeadingRows": integer,
          "encoding": string,
          "quote": string,
          "maxBadRecords": integer,
          "schemaInlineFormat": string,
          "schemaInline": string,
          "allowQuotedNewlines": boolean,
          "sourceFormat": string,
          "allowJaggedRows": boolean,
          "ignoreUnknownValues": boolean,
          "projectionFields": [
            string
          ]
        },
        "link": {
          "sourceUri": [
            string
          ],
          "destinationTable": {
            "projectId": string,
            "datasetId": string,
            "tableId": string
          },
          "createDisposition": string,
          "writeDisposition": string
        },
        "copy": {
          "sourceTable": {
            "projectId": string,
            "datasetId": string,
            "tableId": string
          },
          "sourceTables": [
            {
              "projectId": string,
              "datasetId": string,
              "tableId": string
            }
          ],
          "destinationTable": {
            "projectId": string,
            "datasetId": string,
            "tableId": string
          },
          "createDisposition": string,
          "writeDisposition": string
        },
        "extract": {
          "sourceTable": {
            "projectId": string,
            "datasetId": string,
            "tableId": string
          },
          "destinationUri": string,
          "destinationUris": [
            string
          ],
          "printHeader": boolean,
          "fieldDelimiter": string,
          "destinationFormat": string,
          "compression": string
        },
        "dryRun": boolean
      },
      "status": {
        "state": string,
        "errorResult": {
          "reason": string,
          "location": string,
          "debugInfo": string,
          "message": string
        },
        "errors": [
          {
            "reason": string,
            "location": string,
            "debugInfo": string,
            "message": string
          }
        ]
      },
      "user_email": string
    }
  ]
}
Property name Value Description Notes
kind bigquery#jobList The resource type of the response.
etag etag A hash of this page of results.
nextPageToken string A token to request the next page of results.
jobs[] list List of jobs that were requested.
jobs[].id string Unique opaque ID of the job.
jobs[].jobReference nested object Job reference uniquely identifying the job.
jobs[].jobReference.projectId string [Required] The ID of the project containing this job.
jobs[].jobReference.jobId string [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.
jobs[].state string Running state of the job. When the state is DONE, errorResult can be checked to determine whether the job succeeded or failed.
jobs[].errorResult nested object A result object that will be present only if the job has failed.
jobs[].errorResult.reason string A short error code that summarizes the error.
jobs[].errorResult.location string Specifies where the error occurred, if present.
jobs[].errorResult.message string A human-readable description of the error.
jobs[].statistics nested object [Output-only] Information about the job, including starting time and ending time of the job.
jobs[].statistics.startTime long [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.
jobs[].statistics.endTime long [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.
jobs[].statistics.totalBytesProcessed long [Output-only] [Deprecated] Use the bytes processed in the query statistics instead.
jobs[].configuration nested object [Full-projection-only] Specifies the job configuration.
jobs[].configuration.query nested object [Pick one] Configures a query job.
jobs[].configuration.query.query string [Required] BigQuery SQL query to execute.
jobs[].configuration.query.destinationTable nested object [Optional] Describes the table where the query results should be stored. If not present, a new table will be created to store the results.
jobs[].configuration.query.destinationTable.projectId string [Required] The ID of the project containing this table.
jobs[].configuration.query.destinationTable.datasetId string [Required] The ID of the dataset containing this table.
jobs[].configuration.query.destinationTable.tableId string [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.
jobs[].configuration.query.createDisposition string [Optional] Specifies whether the job is allowed to create new tables. 

The following values are supported: 
  • CREATE_IF_NEEDED: If the table does not exist, BigQuery creates the table. 
  • CREATE_NEVER: The table must already exist. If it does not, a 'notFound' error is returned in the job result. 
The default value is CREATE_IF_NEEDED

Creation, truncation and append actions occur as one atomic update upon job completion.
jobs[].configuration.query.writeDisposition string [Optional] Specifies the action that occurs if the destination table already exists.

The following values are supported: 
  • WRITE_TRUNCATE: If the table already exists, BigQuery overwrites the table data. 
  • WRITE_APPEND: If the table already exists, BigQuery appends the data to the table. 
  • WRITE_EMPTY: If the table already exists and contains data, a 'duplicate' error is returned in the job result. 
The default value is WRITE_EMPTY

Each action is atomic and only occurs if BigQuery is able to complete the job successfully. Creation, truncation and append actions occur as one atomic update upon job completion.
jobs[].configuration.query.defaultDataset nested object [Optional] Specifies the default dataset to use for unqualified table names in the query.
jobs[].configuration.query.defaultDataset.datasetId string [Required] A unique ID for this dataset, without the project name. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.
jobs[].configuration.query.defaultDataset.projectId string [Optional] The ID of the project containing this dataset.
jobs[].configuration.load nested object [Pick one] Configures a load job.
jobs[].configuration.load.sourceUris[] list [Required] The fully-qualified URIs that point to your data in Google Cloud Storage. Each URI can contain one '*' wildcard character and it must come after the 'bucket' name.
jobs[].configuration.load.schema nested object [Optional] The schema for the destination table. The schema can be omitted if the destination table already exists, or if you're loading data from Google Cloud Datastore.
jobs[].configuration.load.schema.fields[] list Describes the fields in a table.
jobs[].configuration.load.schema.fields[].name string [Required] The field name. The name must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_), and must start with a letter or underscore. The maximum length is 128 characters.
jobs[].configuration.load.schema.fields[].type string [Required] The field data type. Possible values include STRING, INTEGER, FLOAT, BOOLEAN, TIMESTAMP or RECORD (where RECORD indicates that the field contains a nested schema).
jobs[].configuration.load.schema.fields[].mode string [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE.
jobs[].configuration.load.schema.fields[].fields[] list [Optional] Describes the nested schema fields if the type property is set to RECORD.
jobs[].configuration.load.destinationTable nested object [Required] The destination table to load the data into.
jobs[].configuration.load.destinationTable.projectId string [Required] The ID of the project containing this table.
jobs[].configuration.load.destinationTable.datasetId string [Required] The ID of the dataset containing this table.
jobs[].configuration.load.destinationTable.tableId string [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.
jobs[].configuration.load.createDisposition string [Optional] Specifies whether the job is allowed to create new tables. 

The following values are supported: 
  • CREATE_IF_NEEDED: If the table does not exist, BigQuery creates the table. 
  • CREATE_NEVER: The table must already exist. If it does not, a 'notFound' error is returned in the job result. 
The default value is CREATE_IF_NEEDED

Creation, truncation and append actions occur as one atomic update upon job completion.
jobs[].configuration.load.writeDisposition string [Optional] Specifies the action that occurs if the destination table already exists. The following values are supported: WRITE_TRUNCATE: If the table already exists, BigQuery overwrites the table data. WRITE_APPEND: If the table already exists, BigQuery appends the data to the table. WRITE_EMPTY: If the table already exists and contains data, a 'duplicate' error is returned in the job result. The default value is WRITE_APPEND. Each action is atomic and only occurs if BigQuery is able to complete the job successfully. Creation, truncation and append actions occur as one atomic update upon job completion.
jobs[].configuration.load.fieldDelimiter string [Optional] The separator for fields in a CSV file. BigQuery converts the string to ISO-8859-1 encoding, and then uses the first byte of the encoded string to split the data in its raw, binary state. BigQuery also supports the escape sequence "\t" to specify a tab separator. The default value is a comma (',').
jobs[].configuration.load.skipLeadingRows integer [Optional] The number of rows at the top of a CSV file that BigQuery will skip when loading the data. The default value is 0. This property is useful if you have header rows in the file that should be skipped.
jobs[].configuration.load.encoding string [Optional] The character encoding of the data. The supported values are UTF-8 or ISO-8859-1. The default value is UTF-8. BigQuery decodes the data after the raw, binary data has been split using the values of the quote and fieldDelimiter properties.
jobs[].configuration.load.maxBadRecords integer [Optional] The maximum number of bad records that BigQuery can ignore when running the job. If the number of bad records exceeds this value, an invalid error is returned in the job result. The default value is 0, which requires that all records are valid.
jobs[].configuration.copy nested object [Pick one] Copies a table.
jobs[].configuration.copy.sourceTable nested object [Pick one] Source table to copy.
jobs[].configuration.copy.sourceTable.projectId string [Required] The ID of the project containing this table.
jobs[].configuration.copy.sourceTable.datasetId string [Required] The ID of the dataset containing this table.
jobs[].configuration.copy.sourceTable.tableId string [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.
jobs[].configuration.copy.destinationTable nested object [Required] The destination table
jobs[].configuration.copy.destinationTable.projectId string [Required] The ID of the project containing this table.
jobs[].configuration.copy.destinationTable.datasetId string [Required] The ID of the dataset containing this table.
jobs[].configuration.copy.destinationTable.tableId string [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.
jobs[].configuration.copy.createDisposition string [Optional] Specifies whether the job is allowed to create new tables. 

The following values are supported: 
  • CREATE_IF_NEEDED: If the table does not exist, BigQuery creates the table. 
  • CREATE_NEVER: The table must already exist. If it does not, a 'notFound' error is returned in the job result. 
The default value is CREATE_IF_NEEDED

Creation, truncation and append actions occur as one atomic update upon job completion.
jobs[].configuration.copy.writeDisposition string [Optional] Specifies the action that occurs if the destination table already exists.

The following values are supported: 
  • WRITE_TRUNCATE: If the table already exists, BigQuery overwrites the table data. 
  • WRITE_APPEND: If the table already exists, BigQuery appends the data to the table. 
  • WRITE_EMPTY: If the table already exists and contains data, a 'duplicate' error is returned in the job result. 
The default value is WRITE_EMPTY

Each action is atomic and only occurs if BigQuery is able to complete the job successfully. Creation, truncation and append actions occur as one atomic update upon job completion.
jobs[].configuration.extract nested object [Pick one] Configures an extract job.
jobs[].configuration.extract.sourceTable nested object [Required] A reference to the table being exported.
jobs[].configuration.extract.sourceTable.projectId string [Required] The ID of the project containing this table.
jobs[].configuration.extract.sourceTable.datasetId string [Required] The ID of the dataset containing this table.
jobs[].configuration.extract.sourceTable.tableId string [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.
jobs[].configuration.extract.destinationUri string [Pick one] DEPRECATED: Use destinationUris instead, passing only one URI as necessary. The fully-qualified Google Cloud Storage URI where the extracted table should be written.
jobs[].status nested object [Full-projection-only] Describes the state of the job.
jobs[].status.state string [Output-only] Running state of the job.
jobs[].status.errorResult nested object [Output-only] Final error result of the job. If present, indicates that the job has completed and was unsuccessful.
jobs[].status.errorResult.reason string A short error code that summarizes the error.
jobs[].status.errorResult.location string Specifies where the error occurred, if present.
jobs[].status.errorResult.message string A human-readable description of the error.
jobs[].status.errors[] list [Output-only] All errors encountered during the running of the job. Errors here do not necessarily mean that the job has completed or was unsuccessful.
jobs[].status.errors[].reason string A short error code that summarizes the error.
jobs[].status.errors[].location string Specifies where the error occurred, if present.
jobs[].status.errors[].message string A human-readable description of the error.
jobs[].kind string The resource type.
jobs[].errorResult.debugInfo string Debugging information. This property is internal to Google and should not be used.
jobs[].configuration.link.sourceUri[] list [Required] URI of source table to link.
jobs[].configuration.link.destinationTable nested object [Required] The destination table of the link job.
jobs[].configuration.link.destinationTable.projectId string [Required] The ID of the project containing this table.
jobs[].configuration.link.destinationTable.datasetId string [Required] The ID of the dataset containing this table.
jobs[].configuration.link.destinationTable.tableId string [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.
jobs[].configuration.link.createDisposition string [Optional] Specifies whether the job is allowed to create new tables. 

The following values are supported: 
  • CREATE_IF_NEEDED: If the table does not exist, BigQuery creates the table. 
  • CREATE_NEVER: The table must already exist. If it does not, a 'notFound' error is returned in the job result. 
The default value is CREATE_IF_NEEDED

Creation, truncation and append actions occur as one atomic update upon job completion.
jobs[].configuration.link.writeDisposition string [Optional] Specifies the action that occurs if the destination table already exists.

The following values are supported: 
  • WRITE_TRUNCATE: If the table already exists, BigQuery overwrites the table data. 
  • WRITE_APPEND: If the table already exists, BigQuery appends the data to the table. 
  • WRITE_EMPTY: If the table already exists and contains data, a 'duplicate' error is returned in the job result. 
The default value is WRITE_EMPTY

Each action is atomic and only occurs if BigQuery is able to complete the job successfully. Creation, truncation and append actions occur as one atomic update upon job completion.
jobs[].configuration.extract.printHeader boolean [Optional] Whether to print out a header row in the results. Default is true.
jobs[].configuration.extract.fieldDelimiter string [Optional] Delimiter to use between fields in the exported data. Default is ','
jobs[].status.errorResult.debugInfo string Debugging information. This property is internal to Google and should not be used.
jobs[].status.errors[].debugInfo string Debugging information. This property is internal to Google and should not be used.
jobs[].statistics.query nested object [Output-only] Statistics for a query job.
jobs[].statistics.query.totalBytesProcessed long [Output-only] Total bytes processed for this job.
jobs[].statistics.load nested object [Output-only] Statistics for a load job.
jobs[].statistics.load.inputFiles long [Output-only] Number of source files in a load job.
jobs[].statistics.load.inputFileBytes long [Output-only] Number of bytes of source data in a joad job.
jobs[].statistics.load.outputRows long [Output-only] Number of rows imported in a load job. Note that while an import job is in the running state, this value may change.
jobs[].statistics.load.outputBytes long [Output-only] Size of the loaded data in bytes. Note that while an import job is in the running state, this value may change.
jobs[].configuration.query.priority string [Optional] Specifies a priority for the query. Possible values include INTERACTIVE and BATCH. The default value is INTERACTIVE.
jobs[].configuration.load.quote string [Optional] The value that is used to quote data sections in a CSV file. BigQuery converts the string to ISO-8859-1 encoding, and then uses the first byte of the encoded string to split the data in its raw, binary state. The default value is a double-quote ('"'). If your data does not contain quoted sections, set the property value to an empty string. If your data contains quoted newline characters, you must also set the allowQuotedNewlines property to true.
jobs[].configuration.load.schemaInlineFormat string [Deprecated] The format of the schemaInline property.
jobs[].configuration.load.schemaInline string [Deprecated] The inline schema. For CSV schemas, specify as "Field1:Type1[,Field2:Type2]*". For example, "foo:STRING, bar:INTEGER, baz:FLOAT".
jobs[].configuration.load.allowQuotedNewlines boolean Indicates if BigQuery should allow quoted data sections that contain newline characters in a CSV file. The default value is false.
jobs[].configuration.load.sourceFormat string [Optional] The format of the data files. For CSV files, specify "CSV". For datastore backups, specify "DATASTORE_BACKUP". For newline-delimited JSON, specify "NEWLINE_DELIMITED_JSON". The default value is CSV.
jobs[].configuration.extract.destinationFormat string [Optional] The exported file format. Possible values include CSV, NEWLINE_DELIMITED_JSON and AVRO. The default value is CSV. Tables with nested or repeated fields cannot be exported as CSV.
jobs[].configuration.query.preserveNulls boolean [Deprecated] This property is deprecated.
jobs[].statistics.query.cacheHit boolean [Output-only] Whether the query result was fetched from the query cache. For more information, see query caching.
jobs[].configuration.query.allowLargeResults boolean If true, allows the query to produce arbitrarily large result tables at a slight cost in performance. Requires destinationTable to be set.
jobs[].configuration.query.useQueryCache boolean [Optional] Whether to look for the result in the query cache. The query cache is a best-effort cache that will be flushed whenever tables in the query are modified. Moreover, the query cache is only available when a query does not have a destination table specified. For more information, see query caching.
jobs[].configuration.load.allowJaggedRows boolean [Optional] Accept rows that are missing trailing optional columns. The missing values are treated as nulls. If false, records with missing trailing columns are treated as bad records, and if there are too many bad records, an invalid error is returned in the job result. The default value is false. Only applicable to CSV, ignored for other formats.
jobs[].configuration.dryRun boolean [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.
jobs[].statistics.creationTime long [Output-only] Creation time of this job, in milliseconds since the epoch. This field will be present on all jobs.
jobs[].configuration.load.schema.fields[].description string [Optional] The field description. The maximum length is 16K characters.
jobs[].user_email string [Full-projection-only] Email address of the user who ran the job.
jobs[].configuration.load.ignoreUnknownValues boolean [Optional] Indicates if BigQuery should allow extra values that are not represented in the table schema. If true, the extra values are ignored. If false, records with extra columns are treated as bad records, and if there are too many bad records, an invalid error is returned in the job result. The default value is false. The sourceFormat property determines what BigQuery treats as an extra value: CSV: Trailing columns JSON: Named values that don't match any column names
jobs[].configuration.extract.destinationUris[] list [Pick one] A list of fully-qualified Google Cloud Storage URIs where the extracted table should be written.
jobs[].configuration.query.flattenResults boolean [Optional] Flattens all nested and repeated fields in the query results. The default value is true. allowLargeResults must be true if this is set to false.
jobs[].configuration.extract.compression string [Optional] The compression type to use for exported files. Possible values include GZIP and NONE. The default value is NONE.
jobs[].configuration.copy.sourceTables[] list [Pick one] Source tables to copy.
jobs[].configuration.copy.sourceTables[].projectId string [Required] The ID of the project containing this table.
jobs[].configuration.copy.sourceTables[].datasetId string [Required] The ID of the dataset containing this table.
jobs[].configuration.copy.sourceTables[].tableId string [Required] The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.
jobs[].statistics.extract nested object [Output-only] Statistics for an extract job.
jobs[].statistics.extract.destinationUriFileCounts[] list [Output-only] Number of files per destination URI or URI pattern specified in the extract configuration. These values will be in the same order as the URIs specified in the 'destinationUris' field.
jobs[].configuration.load.projectionFields[] list [Experimental] If sourceFormat is set to "DATASTORE_BACKUP", indicates which entity properties to load into BigQuery from a Cloud Datastore backup. Property names are case sensitive and must be top-level properties. If no properties are specified, BigQuery loads all properties. If any named property isn't found in the Cloud Datastore backup, an invalid error is returned in the job result.
jobs[].configuration.query.tableDefinitions object [Experimental] If querying an external data source outside of BigQuery, describes the data format, location and other properties of the data source. By defining these properties, the data source can then be queried as if it were a standard BigQuery table.
jobs[].configuration.query.tableDefinitions.(key) nested object
jobs[].configuration.query.tableDefinitions.(key).sourceUris[] list [Required] The fully-qualified URIs that point to your data in Google Cloud Storage. Each URI can contain one '*' wildcard character and it must come after the 'bucket' name. Size limits related to load jobs apply to external data sources, plus an additional limit of 10 GB maximum size across all URIs.
jobs[].configuration.query.tableDefinitions.(key).schema nested object [Required] The schema for the data.
jobs[].configuration.query.tableDefinitions.(key).schema.fields[] list Describes the fields in a table.
jobs[].configuration.query.tableDefinitions.(key).schema.fields[].name string [Required] The field name. The name must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_), and must start with a letter or underscore. The maximum length is 128 characters.
jobs[].configuration.query.tableDefinitions.(key).schema.fields[].type string [Required] The field data type. Possible values include STRING, INTEGER, FLOAT, BOOLEAN, TIMESTAMP or RECORD (where RECORD indicates that the field contains a nested schema).
jobs[].configuration.query.tableDefinitions.(key).schema.fields[].mode string [Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE.
jobs[].configuration.query.tableDefinitions.(key).schema.fields[].fields[] list [Optional] Describes the nested schema fields if the type property is set to RECORD.
jobs[].configuration.query.tableDefinitions.(key).schema.fields[].description string [Optional] The field description. The maximum length is 16K characters.
jobs[].configuration.query.tableDefinitions.(key).sourceFormat string [Required] The data format. For CSV files, specify "CSV". For newline-delimited JSON, specify "NEWLINE_DELIMITED_JSON".
jobs[].configuration.query.tableDefinitions.(key).maxBadRecords integer [Optional] The maximum number of bad records that BigQuery can ignore when reading data. If the number of bad records exceeds this value, an invalid error is returned in the job result. The default value is 0, which requires that all records are valid.
jobs[].configuration.query.tableDefinitions.(key).ignoreUnknownValues boolean [Optional] Indicates if BigQuery should allow extra values that are not represented in the table schema. If true, the extra values are ignored. If false, records with extra columns are treated as bad records, and if there are too many bad records, an invalid error is returned in the job result. The default value is false. The sourceFormat property determines what BigQuery treats as an extra value: CSV: Trailing columns JSON: Named values that don't match any column names
jobs[].configuration.query.tableDefinitions.(key).compression string [Optional] The compression type of the data source. Possible values include GZIP and NONE. The default value is NONE.
jobs[].configuration.query.tableDefinitions.(key).csvOptions nested object Additional properties to set if sourceFormat is set to CSV.
jobs[].configuration.query.tableDefinitions.(key).csvOptions.fieldDelimiter string [Optional] The separator for fields in a CSV file. BigQuery converts the string to ISO-8859-1 encoding, and then uses the first byte of the encoded string to split the data in its raw, binary state. BigQuery also supports the escape sequence "\t" to specify a tab separator. The default value is a comma (',').
jobs[].configuration.query.tableDefinitions.(key).csvOptions.skipLeadingRows integer [Optional] The number of rows at the top of a CSV file that BigQuery will skip when reading the data. The default value is 0. This property is useful if you have header rows in the file that should be skipped.
jobs[].configuration.query.tableDefinitions.(key).csvOptions.quote string [Optional] The value that is used to quote data sections in a CSV file. BigQuery converts the string to ISO-8859-1 encoding, and then uses the first byte of the encoded string to split the data in its raw, binary state. The default value is a double-quote ('"'). If your data does not contain quoted sections, set the property value to an empty string. If your data contains quoted newline characters, you must also set the allowQuotedNewlines property to true.
jobs[].configuration.query.tableDefinitions.(key).csvOptions.allowQuotedNewlines boolean [Optional] Indicates if BigQuery should allow quoted data sections that contain newline characters in a CSV file. The default value is false.
jobs[].configuration.query.tableDefinitions.(key).csvOptions.allowJaggedRows boolean [Optional] Indicates if BigQuery should accept rows that are missing trailing optional columns. If true, BigQuery treats missing trailing columns as null values. If false, records with missing trailing columns are treated as bad records, and if there are too many bad records, an invalid error is returned in the job result. The default value is false.
jobs[].configuration.query.tableDefinitions.(key).csvOptions.encoding string [Optional] The character encoding of the data. The supported values are UTF-8 or ISO-8859-1. The default value is UTF-8. BigQuery decodes the data after the raw, binary data has been split using the values of the quote and fieldDelimiter properties.
jobs[].configuration.query.userDefinedFunctionResources[] list [Experimental] Describes user-defined function resources used in the query.
jobs[].configuration.query.userDefinedFunctionResources[].resourceUri string [Pick one] A code resource to load from a Google Cloud Storage URI (gs://bucket/path).
jobs[].configuration.query.userDefinedFunctionResources[].inlineCode string [Pick one] An inline resource that contains code for a user-defined function (UDF). Providing a inline code resource is equivalent to providing a URI for a file containing the same code.

Try it!

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