Jobs: list

Lists all the Jobs in the specified project that were started by the user. The job list returns in reverse chronological order of when the jobs were created, starting with the most recent job created.
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.

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.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 and the job fails. 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.

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.

[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. Default is false which treats short rows as errors. 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] User who ran the job.

jobs[].configuration.load.ignoreUnknownValues

boolean

[Optional] Accept rows that contain values that do not match the schema. The unknown values are ignored. Default is false which treats unknown values as errors. For CSV this ignores extra values at the end of a line. For JSON this ignores named values that do not match any column name.

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

[Experimental] 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.

Try it!

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