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
NameDescription
clientBigQueryClient

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

resourceModel

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
NameDescription
destinationUrisIEnumerable<String>

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

optionsCreateModelExtractJobOptions

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
NameDescription
destinationUriString

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

optionsCreateModelExtractJobOptions

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
NameDescription
destinationUrisIEnumerable<String>

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

optionsCreateModelExtractJobOptions

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
NameDescription
destinationUriString

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

optionsCreateModelExtractJobOptions

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
NameDescription
optionsDeleteModelOptions

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
NameDescription
optionsDeleteModelOptions

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
NameDescription
resourceModel

The resource to patch with. Must not be null.

matchETagBoolean

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

optionsPatchModelOptions

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
NameDescription
resourceModel

The resource to patch with. Must not be null.

matchETagBoolean

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

optionsPatchModelOptions

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