Class BigQueryModel

public sealed class BigQueryModel

A model within a BigQuery dataset.

Inheritance

Object > BigQueryModel

Namespace

Google.Cloud.BigQuery.V2

Assembly

Google.Cloud.BigQuery.V2.dll

Remarks

This class wraps the underlying REST API resource and retains a reference to the original client, allowing for simpler model-oriented operations.

Constructors

BigQueryModel(BigQueryClient, Model)

public BigQueryModel(BigQueryClient client, Model resource)

Constructs a new model.

Parameters
TypeNameDescription
BigQueryClientclient

The client to use for operations on the model. Must not be null.

Modelresource

The REST-ful resource representing the model. Must not be null.

Remarks

This is public to allow tests to construct instances for production code to consume; production code should not normally construct instances itself.

Properties

Reference

public ModelReference Reference { get; }

The fully-qualified identifier for the model, as an object which can be used for other operations within this API.

Property Value
TypeDescription
ModelReference
Remarks

The properties within the reference can be used to determine the project ID, dataset ID and model ID components.

Resource

public Model Resource { get; }

The underlying REST-ful resource for the model.

Property Value
TypeDescription
Model
Remarks

The data within the resource may be incomplete, depending on how it was obtained. (ListModels operations return less data than GetModel operations.)

Methods

CreateModelExtractJob(IEnumerable<String>, CreateModelExtractJobOptions)

public BigQueryJob CreateModelExtractJob(IEnumerable<string> destinationUris, CreateModelExtractJobOptions options = null)

Creates a job to extract this model to Google Cloud Storage. See the BigQuery documentation for more information on model extract jobs. This method just creates a ModelReference and delegates to CreateModelExtractJob(ModelReference, IEnumerable<String>, CreateModelExtractJobOptions).

Parameters
TypeNameDescription
IEnumerable<String>destinationUris

The Google Cloud Storage URIs (possibly including a wildcard) to extract the model to. Must not be null or empty.

CreateModelExtractJobOptionsoptions

The options for the operation. May be null, in which case defaults will be supplied.

Returns
TypeDescription
BigQueryJob

The job created for the extract operation.

CreateModelExtractJob(String, CreateModelExtractJobOptions)

public BigQueryJob CreateModelExtractJob(string destinationUri, CreateModelExtractJobOptions options = null)

Creates a job to extract this model to Google Cloud Storage. See the BigQuery documentation for more information on model extract jobs. This method just creates a ModelReference and delegates to CreateModelExtractJob(ModelReference, String, CreateModelExtractJobOptions).

Parameters
TypeNameDescription
StringdestinationUri

The Google Cloud Storage URI (possibly including a wildcard) to extract the model to. Must not be null.

CreateModelExtractJobOptionsoptions

The options for the operation. May be null, in which case defaults will be supplied.

Returns
TypeDescription
BigQueryJob

The job created for the extract operation.

CreateModelExtractJobAsync(IEnumerable<String>, CreateModelExtractJobOptions, CancellationToken)

public Task<BigQueryJob> CreateModelExtractJobAsync(IEnumerable<string> destinationUris, CreateModelExtractJobOptions options = null, CancellationToken cancellationToken = default(CancellationToken))

Asynchronously creates a job to extract this model to Google Cloud Storage. See the BigQuery documentation for more information on model extract jobs. This method just creates a ModelReference and delegates to CreateModelExtractJobAsync(ModelReference, IEnumerable<String>, CreateModelExtractJobOptions, CancellationToken).

Parameters
TypeNameDescription
IEnumerable<String>destinationUris

The Google Cloud Storage URIs (possibly including a wildcard) to extract the model to. Must not be null or empty.

CreateModelExtractJobOptionsoptions

The options for the operation. May be null, in which case defaults will be supplied.

CancellationTokencancellationToken

The token to monitor for cancellation requests.

Returns
TypeDescription
Task<BigQueryJob>

A task representing the asynchronous operation. When complete, the result is the job created for the extract operation.

CreateModelExtractJobAsync(String, CreateModelExtractJobOptions, CancellationToken)

public Task<BigQueryJob> CreateModelExtractJobAsync(string destinationUri, CreateModelExtractJobOptions options = null, CancellationToken cancellationToken = default(CancellationToken))

Asynchronously creates a job to extract this model to Google Cloud Storage. See the BigQuery documentation for more information on model extract jobs. This method just creates a ModelReference and delegates to CreateModelExtractJobAsync(ModelReference, String, CreateModelExtractJobOptions, CancellationToken).

Parameters
TypeNameDescription
StringdestinationUri

The Google Cloud Storage URI (possibly including a wildcard) to extract the model to. Must not be null or empty.

CreateModelExtractJobOptionsoptions

The options for the operation. May be null, in which case defaults will be supplied.

CancellationTokencancellationToken

The token to monitor for cancellation requests.

Returns
TypeDescription
Task<BigQueryJob>

A task representing the asynchronous operation. When complete, the result is the job created for the extract operation.

Delete(DeleteModelOptions)

public void Delete(DeleteModelOptions options = null)

Deletes this model. This method just creates a ModelReference and delegates to DeleteModel(ModelReference, DeleteModelOptions).

Parameter
TypeNameDescription
DeleteModelOptionsoptions

The options for the operation. May be null, in which case defaults will be supplied.

DeleteAsync(DeleteModelOptions, CancellationToken)

public Task DeleteAsync(DeleteModelOptions options = null, CancellationToken cancellationToken = default(CancellationToken))

Asynchronously deletes this model. This method just creates a ModelReference and delegates to DeleteModelAsync(ModelReference, DeleteModelOptions, CancellationToken).

Parameters
TypeNameDescription
DeleteModelOptionsoptions

The options for the operation. May be null, in which case defaults will be supplied.

CancellationTokencancellationToken

The token to monitor for cancellation requests.

Returns
TypeDescription
Task

A task representing the asynchronous operation.

Patch(Model, Boolean, PatchModelOptions)

public BigQueryModel Patch(Model resource, bool matchETag, PatchModelOptions options = null)

Patches this model with fields in the specified resource.

Parameters
TypeNameDescription
Modelresource

The resource to patch with. Must not be null.

BooleanmatchETag

If true, the etag from Resource is propagated into resource for optimistic concurrency. Otherwise, resource is left unchanged.

PatchModelOptionsoptions

The options for the operation. May be null, in which case defaults will be supplied.

Returns
TypeDescription
BigQueryModel

The updated model.

Remarks

PatchAsync(Model, Boolean, PatchModelOptions, CancellationToken)

public Task<BigQueryModel> PatchAsync(Model resource, bool matchETag, PatchModelOptions options = null, CancellationToken cancellationToken = default(CancellationToken))

Asynchronously patches this model with fields in the specified resource.

Parameters
TypeNameDescription
Modelresource

The resource to patch with. Must not be null.

BooleanmatchETag

If true, the etag from Resource is propagated into resource for optimistic concurrency. Otherwise, resource is left unchanged.

PatchModelOptionsoptions

The options for the operation. May be null, in which case defaults will be supplied.

CancellationTokencancellationToken

The token to monitor for cancellation requests.

Returns
TypeDescription
Task<BigQueryModel>

A task representing the asynchronous operation. When complete, the result is the updated model.

Remarks