Show / Hide Table of Contents

Class JobsResource

The "jobs" collection of methods.

Inheritance
object
JobsResource
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Google.Apis.Bigquery.v2
Assembly: Google.Apis.Bigquery.v2.dll
Syntax
public class JobsResource

Constructors

JobsResource(IClientService)

Constructs a new resource.

Declaration
public JobsResource(IClientService service)
Parameters
Type Name Description
IClientService service

Methods

Cancel(string, string)

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.

Declaration
public virtual JobsResource.CancelRequest Cancel(string projectId, string jobId)
Parameters
Type Name Description
string projectId

Required. Project ID of the job to cancel

string jobId

Required. Job ID of the job to cancel

Returns
Type Description
JobsResource.CancelRequest

Delete(string, string)

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

Declaration
public virtual JobsResource.DeleteRequest Delete(string projectId, string jobId)
Parameters
Type Name Description
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.

Returns
Type Description
JobsResource.DeleteRequest

Get(string, string)

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.

Declaration
public virtual JobsResource.GetRequest Get(string projectId, string jobId)
Parameters
Type Name Description
string projectId

Required. Project ID of the requested job.

string jobId

Required. Job ID of the requested job.

Returns
Type Description
JobsResource.GetRequest

GetQueryResults(string, string)

RPC to get the results of a query job.

Declaration
public virtual JobsResource.GetQueryResultsRequest GetQueryResults(string projectId, string jobId)
Parameters
Type Name Description
string projectId

Required. Project ID of the query job.

string jobId

Required. Job ID of the query job.

Returns
Type Description
JobsResource.GetQueryResultsRequest

Insert(Job, string)

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.

Declaration
public virtual JobsResource.InsertRequest Insert(Job body, string projectId)
Parameters
Type Name Description
Job body

The body of the request.

string projectId

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

Returns
Type Description
JobsResource.InsertRequest

Insert(Job, string, Stream, string)

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.

Declaration
public virtual JobsResource.InsertMediaUpload Insert(Job body, string projectId, Stream stream, string contentType)
Parameters
Type Name Description
Job body

The body of the request.

string projectId

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

Stream stream

The stream to upload. See remarks for further information.

string contentType

The content type of the stream to upload.

Returns
Type Description
JobsResource.InsertMediaUpload
Remarks

Considerations regarding stream:

  • If stream is seekable, then the stream position will be reset to 0 before reading commences. If stream is not seekable, then it will be read from its current position
  • Caller is responsible for maintaining the stream open until the upload is completed
  • Caller is responsible for closing the stream

List(string)

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.

Declaration
public virtual JobsResource.ListRequest List(string projectId)
Parameters
Type Name Description
string projectId

Project ID of the jobs to list.

Returns
Type Description
JobsResource.ListRequest

Query(QueryRequest, string)

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

Declaration
public virtual JobsResource.QueryRequest Query(QueryRequest body, string projectId)
Parameters
Type Name Description
QueryRequest body

The body of the request.

string projectId

Required. Project ID of the query request.

Returns
Type Description
JobsResource.QueryRequest
In this article
Back to top Generated by DocFX