public sealed class BigQueryModel
Reference documentation and code samples for the Google BigQuery v2 API class BigQueryModel.
A model within a BigQuery dataset.
Namespace
Google.Cloud.BigQuery.V2Assembly
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 | |
---|---|
Name | Description |
client | BigQueryClient The client to use for operations on the model. Must not be null. |
resource | Google.Apis.Bigquery.v2.Data.Model The REST-ful resource representing the model. Must not be null. |
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 | |
---|---|
Type | Description |
Google.Apis.Bigquery.v2.Data.ModelReference |
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 | |
---|---|
Type | Description |
Google.Apis.Bigquery.v2.Data.Model |
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 Google.Apis.Bigquery.v2.Data.ModelReference and delegates to CreateModelExtractJob(ModelReference, IEnumerable<String>, CreateModelExtractJobOptions).
Parameters | |
---|---|
Name | Description |
destinationUris | IEnumerable<String> The Google Cloud Storage URIs (possibly including a wildcard) to extract the model to. Must not be null or empty. |
options | CreateModelExtractJobOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
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 Google.Apis.Bigquery.v2.Data.ModelReference and delegates to CreateModelExtractJob(ModelReference, String, CreateModelExtractJobOptions).
Parameters | |
---|---|
Name | Description |
destinationUri | String The Google Cloud Storage URI (possibly including a wildcard) to extract the model to. Must not be null. |
options | CreateModelExtractJobOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
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 Google.Apis.Bigquery.v2.Data.ModelReference and delegates to CreateModelExtractJobAsync(ModelReference, IEnumerable<String>, CreateModelExtractJobOptions, CancellationToken).
Parameters | |
---|---|
Name | Description |
destinationUris | IEnumerable<String> The Google Cloud Storage URIs (possibly including a wildcard) to extract the model to. Must not be null or empty. |
options | CreateModelExtractJobOptions The options for the operation. May be null, in which case defaults will be supplied. |
cancellationToken | CancellationToken The token to monitor for cancellation requests. |
Returns | |
---|---|
Type | Description |
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 Google.Apis.Bigquery.v2.Data.ModelReference and delegates to CreateModelExtractJobAsync(ModelReference, String, CreateModelExtractJobOptions, CancellationToken).
Parameters | |
---|---|
Name | Description |
destinationUri | String The Google Cloud Storage URI (possibly including a wildcard) to extract the model to. Must not be null or empty. |
options | CreateModelExtractJobOptions The options for the operation. May be null, in which case defaults will be supplied. |
cancellationToken | CancellationToken The token to monitor for cancellation requests. |
Returns | |
---|---|
Type | Description |
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 Google.Apis.Bigquery.v2.Data.ModelReference and delegates to DeleteModel(ModelReference, DeleteModelOptions).
Parameter | |
---|---|
Name | Description |
options | DeleteModelOptions 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 Google.Apis.Bigquery.v2.Data.ModelReference and delegates to DeleteModelAsync(ModelReference, DeleteModelOptions, CancellationToken).
Parameters | |
---|---|
Name | Description |
options | DeleteModelOptions The options for the operation. May be null, in which case defaults will be supplied. |
cancellationToken | CancellationToken The token to monitor for cancellation requests. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
resource | Google.Apis.Bigquery.v2.Data.Model The resource to patch with. Must not be null. |
matchETag | Boolean If true, the etag from Resource is propagated into |
options | PatchModelOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
BigQueryModel | The updated model. |
This method delegates to PatchModel(ModelReference, Model, PatchModelOptions).
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 | |
---|---|
Name | Description |
resource | Google.Apis.Bigquery.v2.Data.Model The resource to patch with. Must not be null. |
matchETag | Boolean If true, the etag from Resource is propagated into |
options | PatchModelOptions The options for the operation. May be null, in which case defaults will be supplied. |
cancellationToken | CancellationToken The token to monitor for cancellation requests. |
Returns | |
---|---|
Type | Description |
Task<BigQueryModel> | A task representing the asynchronous operation. When complete, the result is the updated model. |
This method delegates to PatchModelAsync(ModelReference, Model, PatchModelOptions, CancellationToken).