class Jobs extends Resource (View source)

The "jobs" collection of methods.

Typical usage is:

 $bigqueryService = new Google\Service\Bigquery(...);
 $jobs = $bigqueryService->jobs;

Methods

cancel(string $projectId, string $jobId, array $optParams = [])

Requests that a job be cancelled. This call will return immediately, and the client will need to poll for the job status to see if the cancel completed successfully. Cancelled jobs may still incur costs. (jobs.cancel)

delete(string $projectId, string $jobId, array $optParams = [])

Requests the deletion of the metadata of a job. This call returns when the job's metadata is deleted. (jobs.delete)

Job
get(string $projectId, string $jobId, array $optParams = [])

Returns information about a specific job. Job information is available for a six month period after creation. Requires that you're the person who ran the job, or have the Is Owner project role. (jobs.get)

getQueryResults(string $projectId, string $jobId, array $optParams = [])

RPC to get the results of a query job. (jobs.getQueryResults)

Job
insert(string $projectId, Job $postBody, array $optParams = [])

Starts a new asynchronous job. This API has two different kinds of endpoint URIs, as this method supports a variety of use cases. The Metadata URI is used for most interactions, as it accepts the job configuration directly. The Upload URI is ONLY for the case when you're sending both a load job configuration and a data stream together. In this case, the Upload URI accepts the job configuration and the data as two distinct multipart MIME parts. (jobs.insert)

listJobs(string $projectId, array $optParams = [])

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.

query(string $projectId, QueryRequest $postBody, array $optParams = [])

Runs a BigQuery SQL query synchronously and returns query results if the query completes within a specified timeout. (jobs.query)

Details

JobCancelResponse cancel(string $projectId, string $jobId, array $optParams = [])

Requests that a job be cancelled. This call will return immediately, and the client will need to poll for the job status to see if the cancel completed successfully. Cancelled jobs may still incur costs. (jobs.cancel)

Parameters

string $projectId

Required. Project ID of the job to cancel

string $jobId

Required. Job ID of the job to cancel

array $optParams

Optional parameters.

Return Value

JobCancelResponse

Exceptions

Exception

delete(string $projectId, string $jobId, array $optParams = [])

Requests the deletion of the metadata of a job. This call returns when the job's metadata is deleted. (jobs.delete)

Parameters

string $projectId

Required. Project ID of the job for which metadata is to be deleted.

string $jobId

Required. Job ID of the job for which metadata is to be deleted. If this is a parent job which has child jobs, the metadata from all child jobs will be deleted as well. Direct deletion of the metadata of child jobs is not allowed.

array $optParams

Optional parameters.

Exceptions

Exception

Job get(string $projectId, string $jobId, array $optParams = [])

Returns information about a specific job. Job information is available for a six month period after creation. Requires that you're the person who ran the job, or have the Is Owner project role. (jobs.get)

Parameters

string $projectId

Required. Project ID of the requested job.

string $jobId

Required. Job ID of the requested job.

array $optParams

Optional parameters.

Return Value

Job

Exceptions

Exception

GetQueryResultsResponse getQueryResults(string $projectId, string $jobId, array $optParams = [])

RPC to get the results of a query job. (jobs.getQueryResults)

Parameters

string $projectId

Required. Project ID of the query job.

string $jobId

Required. Job ID of the query job.

array $optParams

Optional parameters.

Return Value

GetQueryResultsResponse

Exceptions

Exception

Job insert(string $projectId, Job $postBody, array $optParams = [])

Starts a new asynchronous job. This API has two different kinds of endpoint URIs, as this method supports a variety of use cases. The Metadata URI is used for most interactions, as it accepts the job configuration directly. The Upload URI is ONLY for the case when you're sending both a load job configuration and a data stream together. In this case, the Upload URI accepts the job configuration and the data as two distinct multipart MIME parts. (jobs.insert)

Parameters

string $projectId

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

Job $postBody
array $optParams

Optional parameters.

Return Value

Job

Exceptions

Exception

JobList listJobs(string $projectId, array $optParams = [])

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.

(jobs.listJobs)

Parameters

string $projectId

Project ID of the jobs to list.

array $optParams

Optional parameters.

Return Value

JobList

Exceptions

Exception

QueryResponse query(string $projectId, QueryRequest $postBody, array $optParams = [])

Runs a BigQuery SQL query synchronously and returns query results if the query completes within a specified timeout. (jobs.query)

Parameters

string $projectId

Required. Project ID of the query request.

QueryRequest $postBody
array $optParams

Optional parameters.

Return Value

QueryResponse

Exceptions

Exception