public abstract class BigQueryClient : IDisposable
Reference documentation and code samples for the Google BigQuery v2 API class BigQueryClient.
Abstract class providing operations for Google Cloud BigQuery.
Implements
IDisposableDerived Types
Namespace
Google.Cloud.BigQuery.V2Assembly
Google.Cloud.BigQuery.V2.dll
Remarks
This abstract class is provided to enable testability while permitting additional operations to be added in the future. See Create(String, GoogleCredential) and CreateAsync(String, GoogleCredential) to construct instances; alternatively, you can construct a BigQueryClientImpl directly from a Google.Apis.Bigquery.v2.BigqueryService.
All instance methods declared in this class are virtual, with an implementation which simply throws NotImplementedException. All these methods are overridden in BigQueryClientImpl.
This class implements IDisposable; however, the Dispose() method only requires calling
if many short-lived instances of BigQueryClient are being created.
Most code would be expected to create a single BigQueryClient
instance, and use this instance throughout
the lifetime of the application. In this case, Dispose
need not be called.
Properties
DefaultLocation
public virtual string DefaultLocation { get; }
The default location to use for all operations where locations can be specified, such as dataset and job creation.
Property Value | |
---|---|
Type | Description |
String |
PrettyPrint
public virtual bool PrettyPrint { get; }
Determines whether or not responses should be formatted with whitespace for readability.
Property Value | |
---|---|
Type | Description |
Boolean |
ProjectId
public virtual string ProjectId { get; }
The ID of the project this client operates on. All operations that require a project to be specified implicitly supply this ID.
Property Value | |
---|---|
Type | Description |
String |
Service
public virtual BigqueryService Service { get; }
The underlying BigQuery service object used by this client.
Property Value | |
---|---|
Type | Description |
Google.Apis.Bigquery.v2.BigqueryService |
The BigQueryClient class only provides convenience operations built on top of an existing service object. Any more complex operations which are not supported by this wrapper may wish to use the same service object as the wrapper, in order to take advantage of its configuration (for authentication, application naming etc).
Methods
CancelJob(JobReference, CancelJobOptions)
public virtual BigQueryJob CancelJob(JobReference jobReference, CancelJobOptions options = null)
Cancels the specified job.
Parameters | |
---|---|
Name | Description |
jobReference | Google.Apis.Bigquery.v2.Data.JobReference A fully-qualified identifier for the job. Must not be null. |
options | CancelJobOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
BigQueryJob | The final state of the job. |
See CancelJob for an example using an alternative overload.
CancelJob(String, CancelJobOptions)
public virtual BigQueryJob CancelJob(string jobId, CancelJobOptions options = null)
Cancels the specified job within this client's project. This method just creates a Google.Apis.Bigquery.v2.Data.JobReference and delegates to CancelJob(JobReference, CancelJobOptions).
Parameters | |
---|---|
Name | Description |
jobId | String The job ID. Must not be null. |
options | CancelJobOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
BigQueryJob | The final state of the job. |
// Just an example of a job: extracting data to Google Cloud Storage.
BigQueryClient client = BigQueryClient.Create(projectId);
string destinationUri = $"gs://{bucket}/{objectName}";
// Start the job running...
BigQueryJob job = client.CreateExtractJob(projectId, datasetId, tableId, destinationUri);
// Now cancel it by ID. (Equivalent to calling job.Cancel().)
string jobId = job.Reference.JobId;
BigQueryJob canceledJob = client.CancelJob(jobId);
Console.WriteLine(canceledJob.State);
CancelJob(String, String, CancelJobOptions)
public virtual BigQueryJob CancelJob(string projectId, string jobId, CancelJobOptions options = null)
Cancels the specified job. This method just creates a Google.Apis.Bigquery.v2.Data.JobReference and delegates to CancelJob(JobReference, CancelJobOptions).
Parameters | |
---|---|
Name | Description |
projectId | String The project ID. Must not be null. |
jobId | String The job ID. Must not be null. |
options | CancelJobOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
BigQueryJob | The final state of the job. |
See CancelJob for an example using an alternative overload.
CancelJobAsync(JobReference, CancelJobOptions, CancellationToken)
public virtual Task<BigQueryJob> CancelJobAsync(JobReference jobReference, CancelJobOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously cancels the specified job.
Parameters | |
---|---|
Name | Description |
jobReference | Google.Apis.Bigquery.v2.Data.JobReference A fully-qualified identifier for the job. Must not be null. |
options | CancelJobOptions 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 final state of the job. |
See CancelJob for a synchronous example.
CancelJobAsync(String, CancelJobOptions, CancellationToken)
public virtual Task<BigQueryJob> CancelJobAsync(string jobId, CancelJobOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously cancels the specified job within this client's project. This method just creates a Google.Apis.Bigquery.v2.Data.JobReference and delegates to CancelJobAsync(JobReference, CancelJobOptions, CancellationToken).
Parameters | |
---|---|
Name | Description |
jobId | String The job ID. Must not be null. |
options | CancelJobOptions 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 final state of the job. |
See CancelJob for a synchronous example.
CancelJobAsync(String, String, CancelJobOptions, CancellationToken)
public virtual Task<BigQueryJob> CancelJobAsync(string projectId, string jobId, CancelJobOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously cancels the specified job. This method just creates a Google.Apis.Bigquery.v2.Data.JobReference and delegates to CancelJobAsync(JobReference, CancelJobOptions, CancellationToken).
Parameters | |
---|---|
Name | Description |
projectId | String The project ID. Must not be null. |
jobId | String The job ID. Must not be null. |
options | CancelJobOptions 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 final state of the job. |
See CancelJob for a synchronous example.
ClearDatasetLabels(DatasetReference, ModifyLabelsOptions)
public virtual IDictionary<string, string> ClearDatasetLabels(DatasetReference datasetReference, ModifyLabelsOptions options = null)
Clears all labels on the specified dataset.
Parameters | |
---|---|
Name | Description |
datasetReference | Google.Apis.Bigquery.v2.Data.DatasetReference A fully-qualified identifier for the dataset. Must not be null. |
options | ModifyLabelsOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
IDictionary<String, String> | A dictionary with the labels on the dataset before they were cleared. |
See ClearDatasetLabels for an example using an alternative overload.
ClearDatasetLabels(String, ModifyLabelsOptions)
public virtual IDictionary<string, string> ClearDatasetLabels(string datasetId, ModifyLabelsOptions options = null)
Clears all labels on the specified dataset within this client's project. This method just creates a Google.Apis.Bigquery.v2.Data.DatasetReference and delegates to ClearDatasetLabels(DatasetReference, ModifyLabelsOptions).
Parameters | |
---|---|
Name | Description |
datasetId | String The dataset ID. Must not be null. |
options | ModifyLabelsOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
IDictionary<String, String> | A dictionary with the labels on the dataset before they were cleared. |
BigQueryClient client = BigQueryClient.Create(projectId);
IDictionary<string, string> previousLabels = client.ClearDatasetLabels(datasetId);
Console.WriteLine("Previous labels:");
foreach (KeyValuePair<string, string> label in previousLabels)
{
Console.WriteLine($"Name: {label.Key}; Value: {label.Value}");
}
ClearDatasetLabels(String, String, ModifyLabelsOptions)
public virtual IDictionary<string, string> ClearDatasetLabels(string projectId, string datasetId, ModifyLabelsOptions options = null)
Clears all labels on the specified dataset. This method just creates a Google.Apis.Bigquery.v2.Data.DatasetReference and delegates to ClearDatasetLabels(DatasetReference, ModifyLabelsOptions).
Parameters | |
---|---|
Name | Description |
projectId | String The project ID. Must not be null. |
datasetId | String The dataset ID. Must not be null. |
options | ModifyLabelsOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
IDictionary<String, String> | A dictionary with the labels on the dataset before they were cleared. |
See ClearDatasetLabels for an example using an alternative overload.
ClearDatasetLabelsAsync(DatasetReference, ModifyLabelsOptions, CancellationToken)
public virtual Task<IDictionary<string, string>> ClearDatasetLabelsAsync(DatasetReference datasetReference, ModifyLabelsOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously clears all labels on the specified dataset.
Parameters | |
---|---|
Name | Description |
datasetReference | Google.Apis.Bigquery.v2.Data.DatasetReference A fully-qualified identifier for the dataset. Must not be null. |
options | ModifyLabelsOptions 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<IDictionary<String, String>> | A task representing the asynchronous operation. When complete, the result is a dictionary with the labels on the dataset before they were cleared. |
See ClearDatasetLabels for a synchronous example.
ClearDatasetLabelsAsync(String, ModifyLabelsOptions, CancellationToken)
public virtual Task<IDictionary<string, string>> ClearDatasetLabelsAsync(string datasetId, ModifyLabelsOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously clears all labels on the specified dataset within this client's project. This method just creates a Google.Apis.Bigquery.v2.Data.DatasetReference and delegates to ClearDatasetLabelsAsync(DatasetReference, ModifyLabelsOptions, CancellationToken).
Parameters | |
---|---|
Name | Description |
datasetId | String The dataset ID. Must not be null. |
options | ModifyLabelsOptions 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<IDictionary<String, String>> | A task representing the asynchronous operation. When complete, the result is a dictionary with the labels on the dataset before they were cleared. |
See ClearDatasetLabels for a synchronous example.
ClearDatasetLabelsAsync(String, String, ModifyLabelsOptions, CancellationToken)
public virtual Task<IDictionary<string, string>> ClearDatasetLabelsAsync(string projectId, string datasetId, ModifyLabelsOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously clears all labels on the specified dataset. This method just creates a Google.Apis.Bigquery.v2.Data.DatasetReference and delegates to ClearDatasetLabelsAsync(DatasetReference, ModifyLabelsOptions, CancellationToken).
Parameters | |
---|---|
Name | Description |
projectId | String The project ID. Must not be null. |
datasetId | String The dataset ID. Must not be null. |
options | ModifyLabelsOptions 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<IDictionary<String, String>> | A task representing the asynchronous operation. When complete, the result is a dictionary with the labels on the dataset before they were cleared. |
See ClearDatasetLabels for a synchronous example.
Create(String, GoogleCredential)
public static BigQueryClient Create(string projectId, GoogleCredential credential = null)
Synchronously creates a BigQueryClient, using application default credentials if no credentials are specified.
Parameters | |
---|---|
Name | Description |
projectId | String The ID of the project containing the BigQuery data. Must not be null. |
credential | GoogleCredential Optional GoogleCredential. |
Returns | |
---|---|
Type | Description |
BigQueryClient | The created BigQueryClient. |
If the supplied credentials support scoping, the following scopes are specified, overwriting any previously-specified scopes.
- https://www.googleapis.com/auth/bigquery";
- https://www.googleapis.com/auth/bigquery.insertdata";
- https://www.googleapis.com/auth/devstorage.full_control";
- https://www.googleapis.com/auth/cloud-platform";
If you require a different set of scopes, please create and scope the credential, then use BigQueryClientBuilder, specify the Credential and ProjectId properties, then call Build() to create the client.
CreateAsync(String, GoogleCredential)
public static Task<BigQueryClient> CreateAsync(string projectId, GoogleCredential credential = null)
Asynchronously creates a BigQueryClient, using application default credentials if no credentials are specified.
Parameters | |
---|---|
Name | Description |
projectId | String The ID of the project containing the BigQuery data. Must not be null. |
credential | GoogleCredential Optional GoogleCredential. |
Returns | |
---|---|
Type | Description |
Task<BigQueryClient> | The task representing the created BigQueryClient. |
If the supplied credentials support scoping, the following scopes are specified, overwriting any previously-specified scopes.
- https://www.googleapis.com/auth/bigquery";
- https://www.googleapis.com/auth/bigquery.insertdata";
- https://www.googleapis.com/auth/devstorage.full_control";
- https://www.googleapis.com/auth/cloud-platform";
If you require a different set of scopes, please create and scope the credential, then use BigQueryClientBuilder, specify the Credential and ProjectId properties, then call Build() to create the client.
CreateCopyJob(TableReference, TableReference, CreateCopyJobOptions)
public virtual BigQueryJob CreateCopyJob(TableReference source, TableReference destination, CreateCopyJobOptions options = null)
Creates a job to copy one table to another. This method creates a single-element array and delegates to CreateCopyJob(IEnumerable<TableReference>, TableReference, CreateCopyJobOptions).
Parameters | |
---|---|
Name | Description |
source | Google.Apis.Bigquery.v2.Data.TableReference The source table to copy. Must not be null. |
destination | Google.Apis.Bigquery.v2.Data.TableReference The destination to copy to. Must not be null. |
options | CreateCopyJobOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
BigQueryJob | The job created for the copy operation. |
To avoid confusion between source and destination tables, overloads are not provided that take the individual components of table references. Instead, use GetTableReference(String, String) or GetTableReference(String, String, String) to create table references.
BigQueryClient client = BigQueryClient.Create(projectId);
TableReference sourceTableReference = client.GetTableReference(datasetId, sourceTableId);
TableReference destinationTableReference = client.GetTableReference(datasetId, destinationTableId);
BigQueryJob job = client.CreateCopyJob(sourceTableReference, destinationTableReference)
.PollUntilCompleted();
// If there are any errors, display them.
if (job.Status.ErrorResult != null)
{
foreach (ErrorProto error in job.Status.Errors)
{
Console.WriteLine(error.Message);
}
}
CreateCopyJob(IEnumerable<TableReference>, TableReference, CreateCopyJobOptions)
public virtual BigQueryJob CreateCopyJob(IEnumerable<TableReference> sources, TableReference destination, CreateCopyJobOptions options = null)
Creates a job to copy data from at least one table to another.
Parameters | |
---|---|
Name | Description |
sources | IEnumerable<Google.Apis.Bigquery.v2.Data.TableReference> The source tables to copy. Must not be null or empty. |
destination | Google.Apis.Bigquery.v2.Data.TableReference The destination to copy to. Must not be null. |
options | CreateCopyJobOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
BigQueryJob | The job created for the copy operation. |
To avoid confusion between source and destination tables, overloads are not provided that take the individual components of table references. Instead, use GetTableReference(String, String) or GetTableReference(String, String, String) to create table references.
See CreateCopyJob for an example using an alternative overload.
CreateCopyJobAsync(TableReference, TableReference, CreateCopyJobOptions, CancellationToken)
public virtual Task<BigQueryJob> CreateCopyJobAsync(TableReference source, TableReference destination, CreateCopyJobOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously creates a job to copy one table to another. This method creates a single-element array and delegates to CreateCopyJobAsync(IEnumerable<TableReference>, TableReference, CreateCopyJobOptions, CancellationToken).
Parameters | |
---|---|
Name | Description |
source | Google.Apis.Bigquery.v2.Data.TableReference The source table to copy. Must not be null. |
destination | Google.Apis.Bigquery.v2.Data.TableReference The destination to copy to. Must not be null. |
options | CreateCopyJobOptions 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 copy operation. |
To avoid confusion between source and destination tables, overloads are not provided that take the individual components of table references. Instead, use GetTableReference(String, String) or GetTableReference(String, String, String) to create table references.
BigQueryClient client = BigQueryClient.Create(projectId);
TableReference sourceTableReference = client.GetTableReference(datasetId, sourceTableId);
TableReference destinationTableReference = client.GetTableReference(datasetId, destinationTableId);
BigQueryJob job = await client.CreateCopyJobAsync(sourceTableReference, destinationTableReference);
job = await job.PollUntilCompletedAsync();
// If there are any errors, display them.
if (job.Status.ErrorResult != null)
{
foreach (ErrorProto error in job.Status.Errors)
{
Console.WriteLine(error.Message);
}
}
CreateCopyJobAsync(IEnumerable<TableReference>, TableReference, CreateCopyJobOptions, CancellationToken)
public virtual Task<BigQueryJob> CreateCopyJobAsync(IEnumerable<TableReference> sources, TableReference destination, CreateCopyJobOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously creates a job to copy data from at least one table to another.
Parameters | |
---|---|
Name | Description |
sources | IEnumerable<Google.Apis.Bigquery.v2.Data.TableReference> The source tables to copy. Must not be null or empty. |
destination | Google.Apis.Bigquery.v2.Data.TableReference The destination to copy to. Must not be null. |
options | CreateCopyJobOptions 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 copy operation. |
To avoid confusion between source and destination tables, overloads are not provided that take the individual components of table references. Instead, use GetTableReference(String, String) or GetTableReference(String, String, String) to create table references.
See CreateCopyJob for an example using an alternative overload.
CreateDataset(DatasetReference, Dataset, CreateDatasetOptions)
public virtual BigQueryDataset CreateDataset(DatasetReference datasetReference, Dataset resource = null, CreateDatasetOptions options = null)
Creates the specified dataset.
Parameters | |
---|---|
Name | Description |
datasetReference | Google.Apis.Bigquery.v2.Data.DatasetReference A fully-qualified identifier for the dataset. Must not be null. |
resource | Google.Apis.Bigquery.v2.Data.Dataset The dataset resource representation to use for the creation. May be null in which case default values will be used. |
options | CreateDatasetOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
BigQueryDataset | The created dataset. |
If resource
Google.Apis.Bigquery.v2.Data.Dataset.DatasetReference is specified, then it must be the same as the Google.Apis.Bigquery.v2.Data.DatasetReference obtained from the other parameters.
See CreateDataset for an example using an alternative overload.
CreateDataset(String, Dataset, CreateDatasetOptions)
public virtual BigQueryDataset CreateDataset(string datasetId, Dataset resource = null, CreateDatasetOptions options = null)
Creates the specified dataset within this client's project. This method just creates a Google.Apis.Bigquery.v2.Data.DatasetReference and delegates to CreateDataset(DatasetReference, Dataset, CreateDatasetOptions).
Parameters | |
---|---|
Name | Description |
datasetId | String The dataset ID. Must not be null. |
resource | Google.Apis.Bigquery.v2.Data.Dataset The dataset resource representation to use for the creation. May be null in which case default values will be used. |
options | CreateDatasetOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
BigQueryDataset | The created dataset. |
If resource
Google.Apis.Bigquery.v2.Data.Dataset.DatasetReference is specified, then it must be the same as the Google.Apis.Bigquery.v2.Data.DatasetReference obtained from the other parameters.
BigQueryClient client = BigQueryClient.Create(projectId);
BigQueryDataset dataset = client.CreateDataset(datasetId);
// Now populate tables in the dataset...
CreateDataset(String, String, Dataset, CreateDatasetOptions)
public virtual BigQueryDataset CreateDataset(string projectId, string datasetId, Dataset resource = null, CreateDatasetOptions options = null)
Creates the specified dataset. This method just creates a Google.Apis.Bigquery.v2.Data.DatasetReference and delegates to CreateDataset(DatasetReference, Dataset, CreateDatasetOptions).
Parameters | |
---|---|
Name | Description |
projectId | String The project ID. Must not be null. |
datasetId | String The dataset ID. Must not be null. |
resource | Google.Apis.Bigquery.v2.Data.Dataset The dataset resource representation to use for the creation. May be null in which case default values will be used. |
options | CreateDatasetOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
BigQueryDataset | The created dataset. |
If resource
Google.Apis.Bigquery.v2.Data.Dataset.DatasetReference is specified, then it must be the same as the Google.Apis.Bigquery.v2.Data.DatasetReference obtained from the other parameters.
See CreateDataset for an example using an alternative overload.
CreateDatasetAsync(DatasetReference, Dataset, CreateDatasetOptions, CancellationToken)
public virtual Task<BigQueryDataset> CreateDatasetAsync(DatasetReference datasetReference, Dataset resource = null, CreateDatasetOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously creates the specified dataset.
Parameters | |
---|---|
Name | Description |
datasetReference | Google.Apis.Bigquery.v2.Data.DatasetReference A fully-qualified identifier for the dataset. Must not be null. |
resource | Google.Apis.Bigquery.v2.Data.Dataset The dataset resource representation to use for the creation. May be null in which case default values will be used. |
options | CreateDatasetOptions 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<BigQueryDataset> | A task representing the asynchronous operation. When complete, the result is the created dataset. |
If resource
Google.Apis.Bigquery.v2.Data.Dataset.DatasetReference is specified, then it must be the same as the Google.Apis.Bigquery.v2.Data.DatasetReference obtained from the other parameters.
See CreateDataset for an example using an alternative overload.
CreateDatasetAsync(String, Dataset, CreateDatasetOptions, CancellationToken)
public virtual Task<BigQueryDataset> CreateDatasetAsync(string datasetId, Dataset resource = null, CreateDatasetOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously creates the specified dataset within this client's project. This method just creates a Google.Apis.Bigquery.v2.Data.DatasetReference and delegates to CreateDatasetAsync(DatasetReference, Dataset, CreateDatasetOptions, CancellationToken).
Parameters | |
---|---|
Name | Description |
datasetId | String The dataset ID. Must not be null. |
resource | Google.Apis.Bigquery.v2.Data.Dataset The dataset resource representation to use for the creation. May be null in which case default values will be used. |
options | CreateDatasetOptions 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<BigQueryDataset> | A task representing the asynchronous operation. When complete, the result is the created dataset. |
If resource
Google.Apis.Bigquery.v2.Data.Dataset.DatasetReference is specified, then it must be the same as the Google.Apis.Bigquery.v2.Data.DatasetReference obtained from the other parameters.
BigQueryClient client = await BigQueryClient.CreateAsync(projectId);
BigQueryDataset dataset = await client.CreateDatasetAsync(datasetId);
// Now populate tables in the dataset...
CreateDatasetAsync(String, String, Dataset, CreateDatasetOptions, CancellationToken)
public virtual Task<BigQueryDataset> CreateDatasetAsync(string projectId, string datasetId, Dataset resource = null, CreateDatasetOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously creates the specified dataset. This method just creates a Google.Apis.Bigquery.v2.Data.DatasetReference and delegates to CreateDatasetAsync(DatasetReference, Dataset, CreateDatasetOptions, CancellationToken).
Parameters | |
---|---|
Name | Description |
projectId | String The project ID. Must not be null. |
datasetId | String The dataset ID. Must not be null. |
resource | Google.Apis.Bigquery.v2.Data.Dataset The dataset resource representation to use for the creation. May be null in which case default values will be used. |
options | CreateDatasetOptions 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<BigQueryDataset> | A task representing the asynchronous operation. When complete, the result is the created dataset. |
If resource
Google.Apis.Bigquery.v2.Data.Dataset.DatasetReference is specified, then it must be the same as the Google.Apis.Bigquery.v2.Data.DatasetReference obtained from the other parameters.
See CreateDataset for an example using an alternative overload.
CreateExtractJob(TableReference, IEnumerable<String>, CreateExtractJobOptions)
public virtual BigQueryJob CreateExtractJob(TableReference tableReference, IEnumerable<string> destinationUris, CreateExtractJobOptions options = null)
Creates a job to extract data from the specified BigQuery table to Google Cloud Storage. See the BigQuery documentation for more information on extract jobs.
Parameters | |
---|---|
Name | Description |
tableReference | Google.Apis.Bigquery.v2.Data.TableReference A fully-qualified identifier for the table. Must not be null. |
destinationUris | IEnumerable<String> The Google Cloud Storage URIs (possibly including a wildcard) to extract the data to. Must not be null or empty. |
options | CreateExtractJobOptions 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. |
See CreateExtractJob for an example using an alternative overload.
CreateExtractJob(TableReference, String, CreateExtractJobOptions)
public virtual BigQueryJob CreateExtractJob(TableReference tableReference, string destinationUri, CreateExtractJobOptions options = null)
Creates a job to extract data from the specified BigQuery table to Google Cloud Storage. This method just creates a single-element array and delegates to CreateExtractJob(TableReference, IEnumerable<String>, CreateExtractJobOptions). See the BigQuery documentation for more information on extract jobs.
Parameters | |
---|---|
Name | Description |
tableReference | Google.Apis.Bigquery.v2.Data.TableReference A fully-qualified identifier for the table. Must not be null. |
destinationUri | String The Google Cloud Storage URI (possibly including a wildcard) to extract the data to. Must not be null. |
options | CreateExtractJobOptions 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. |
See CreateExtractJob for an example using an alternative overload.
CreateExtractJob(String, String, IEnumerable<String>, CreateExtractJobOptions)
public virtual BigQueryJob CreateExtractJob(string datasetId, string tableId, IEnumerable<string> destinationUris, CreateExtractJobOptions options = null)
Creates a job to extract data from the specified BigQuery table to Google Cloud Storage. See the BigQuery documentation for more information on extract jobs. This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to CreateExtractJob(TableReference, IEnumerable<String>, CreateExtractJobOptions).
Parameters | |
---|---|
Name | Description |
datasetId | String The dataset ID. Must not be null. |
tableId | String The table ID. Must not be null. |
destinationUris | IEnumerable<String> The Google Cloud Storage URIs (possibly including a wildcard) to extract the data to. Must not be null or empty. |
options | CreateExtractJobOptions 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. |
See CreateExtractJob for an example using an alternative overload.
CreateExtractJob(String, String, String, CreateExtractJobOptions)
public virtual BigQueryJob CreateExtractJob(string datasetId, string tableId, string destinationUri, CreateExtractJobOptions options = null)
Creates a job to extract data from the specified BigQuery table within this client's project to Google Cloud Storage. This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to CreateExtractJob(TableReference, String, CreateExtractJobOptions). See the BigQuery documentation for more information on extract jobs.
Parameters | |
---|---|
Name | Description |
datasetId | String The dataset ID. Must not be null. |
tableId | String The table ID. Must not be null. |
destinationUri | String The Google Cloud Storage URI (possibly including a wildcard) to extract the data to. Must not be null. |
options | CreateExtractJobOptions 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. |
See CreateExtractJob for an example using an alternative overload.
CreateExtractJob(String, String, String, IEnumerable<String>, CreateExtractJobOptions)
public virtual BigQueryJob CreateExtractJob(string projectId, string datasetId, string tableId, IEnumerable<string> destinationUris, CreateExtractJobOptions options = null)
Creates a job to extract data from the specified BigQuery table to Google Cloud Storage. See the BigQuery documentation for more information on extract jobs. This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to CreateExtractJob(TableReference, IEnumerable<String>, CreateExtractJobOptions).
Parameters | |
---|---|
Name | Description |
projectId | String The project ID. Must not be null. |
datasetId | String The dataset ID. Must not be null. |
tableId | String The table ID. Must not be null. |
destinationUris | IEnumerable<String> The Google Cloud Storage URIs (possibly including a wildcard) to extract the data to. Must not be null or empty. |
options | CreateExtractJobOptions 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. |
See CreateExtractJob for an example using an alternative overload.
CreateExtractJob(String, String, String, String, CreateExtractJobOptions)
public virtual BigQueryJob CreateExtractJob(string projectId, string datasetId, string tableId, string destinationUri, CreateExtractJobOptions options = null)
Creates a job to extract data from the specified BigQuery table to Google Cloud Storage. This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to CreateExtractJob(TableReference, String, CreateExtractJobOptions). See the BigQuery documentation for more information on extract jobs.
Parameters | |
---|---|
Name | Description |
projectId | String The project ID. Must not be null. |
datasetId | String The dataset ID. Must not be null. |
tableId | String The table ID. Must not be null. |
destinationUri | String The Google Cloud Storage URI (possibly including a wildcard) to extract the data to. Must not be null. |
options | CreateExtractJobOptions 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. |
BigQueryClient client = BigQueryClient.Create(projectId);
string destinationUri = $"gs://{bucket}/{objectName}";
BigQueryJob job = client.CreateExtractJob(projectId, datasetId, tableId, destinationUri)
.PollUntilCompleted();
// If there are any errors, display them.
if (job.Status.ErrorResult != null)
{
foreach (ErrorProto error in job.Status.Errors)
{
Console.WriteLine(error.Message);
}
}
else
{
StorageClient storageClient = StorageClient.Create();
var obj = storageClient.GetObject(bucket, objectName);
Console.WriteLine($"Extracted file size: {obj.Size}");
}
CreateExtractJobAsync(TableReference, IEnumerable<String>, CreateExtractJobOptions, CancellationToken)
public virtual Task<BigQueryJob> CreateExtractJobAsync(TableReference tableReference, IEnumerable<string> destinationUris, CreateExtractJobOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously creates a job to extract data from the specified BigQuery table to Google Cloud Storage. See the BigQuery documentation for more information on extract jobs.
Parameters | |
---|---|
Name | Description |
tableReference | Google.Apis.Bigquery.v2.Data.TableReference A fully-qualified identifier for the table. Must not be null. |
destinationUris | IEnumerable<String> The Google Cloud Storage URIs (possibly including a wildcard) to extract the data to. Must not be null or empty. |
options | CreateExtractJobOptions 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. |
See CreateExtractJobAsync for an example using an alternative overload.
CreateExtractJobAsync(TableReference, String, CreateExtractJobOptions, CancellationToken)
public virtual Task<BigQueryJob> CreateExtractJobAsync(TableReference tableReference, string destinationUri, CreateExtractJobOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously creates a job to extract data from the specified BigQuery table to Google Cloud Storage. This method just creates a single-element array and delegates to CreateExtractJobAsync(TableReference, IEnumerable<String>, CreateExtractJobOptions, CancellationToken). See the BigQuery documentation for more information on extract jobs.
Parameters | |
---|---|
Name | Description |
tableReference | Google.Apis.Bigquery.v2.Data.TableReference A fully-qualified identifier for the table. Must not be null. |
destinationUri | String The Google Cloud Storage URI (possibly including a wildcard) to extract the data to. Must not be null. |
options | CreateExtractJobOptions 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. |
See CreateExtractJobAsync for an example using an alternative overload.
CreateExtractJobAsync(String, String, IEnumerable<String>, CreateExtractJobOptions, CancellationToken)
public virtual Task<BigQueryJob> CreateExtractJobAsync(string datasetId, string tableId, IEnumerable<string> destinationUris, CreateExtractJobOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously creates a job to extract data from the specified BigQuery table to Google Cloud Storage. See the BigQuery documentation for more information on extract jobs. This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to CreateExtractJobAsync(TableReference, IEnumerable<String>, CreateExtractJobOptions, CancellationToken).
Parameters | |
---|---|
Name | Description |
datasetId | String The dataset ID. Must not be null. |
tableId | String The table ID. Must not be null. |
destinationUris | IEnumerable<String> The Google Cloud Storage URIs (possibly including a wildcard) to extract the data to. Must not be null or empty. |
options | CreateExtractJobOptions 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. |
See CreateExtractJobAsync for an example using an alternative overload.
CreateExtractJobAsync(String, String, String, CreateExtractJobOptions, CancellationToken)
public virtual Task<BigQueryJob> CreateExtractJobAsync(string datasetId, string tableId, string destinationUri, CreateExtractJobOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously creates a job to extract data from the specified BigQuery table within this client's project to Google Cloud Storage. This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to CreateExtractJobAsync(TableReference, String, CreateExtractJobOptions, CancellationToken). See the BigQuery documentation for more information on extract jobs.
Parameters | |
---|---|
Name | Description |
datasetId | String The dataset ID. Must not be null. |
tableId | String The table ID. Must not be null. |
destinationUri | String The Google Cloud Storage URI (possibly including a wildcard) to extract the data to. Must not be null. |
options | CreateExtractJobOptions 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. |
See CreateExtractJobAsync for an example using an alternative overload.
CreateExtractJobAsync(String, String, String, IEnumerable<String>, CreateExtractJobOptions, CancellationToken)
public virtual Task<BigQueryJob> CreateExtractJobAsync(string projectId, string datasetId, string tableId, IEnumerable<string> destinationUris, CreateExtractJobOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously creates a job to extract data from the specified BigQuery table to Google Cloud Storage. See the BigQuery documentation for more information on extract jobs. This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to CreateExtractJobAsync(TableReference, IEnumerable<String>, CreateExtractJobOptions, CancellationToken).
Parameters | |
---|---|
Name | Description |
projectId | String The project ID. Must not be null. |
datasetId | String The dataset ID. Must not be null. |
tableId | String The table ID. Must not be null. |
destinationUris | IEnumerable<String> The Google Cloud Storage URIs (possibly including a wildcard) to extract the data to. Must not be null or empty. |
options | CreateExtractJobOptions 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. |
See CreateExtractJobAsync for an example using an alternative overload.
CreateExtractJobAsync(String, String, String, String, CreateExtractJobOptions, CancellationToken)
public virtual Task<BigQueryJob> CreateExtractJobAsync(string projectId, string datasetId, string tableId, string destinationUri, CreateExtractJobOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously creates a job to extract data from the specified BigQuery table to Google Cloud Storage. This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to CreateExtractJobAsync(TableReference, String, CreateExtractJobOptions, CancellationToken). See the BigQuery documentation for more information on extract jobs.
Parameters | |
---|---|
Name | Description |
projectId | String The project ID. Must not be null. |
datasetId | String The dataset ID. Must not be null. |
tableId | String The table ID. Must not be null. |
destinationUri | String The Google Cloud Storage URI (possibly including a wildcard) to extract the data to. Must not be null. |
options | CreateExtractJobOptions 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. |
BigQueryClient client = BigQueryClient.Create(projectId);
string destinationUri = $"gs://{bucket}/{objectName}";
BigQueryJob job = await client.CreateExtractJobAsync(projectId, datasetId, tableId, destinationUri);
job = await job.PollUntilCompletedAsync();
// If there are any errors, display them.
if (job.Status.ErrorResult != null)
{
foreach (ErrorProto error in job.Status.Errors)
{
Console.WriteLine(error.Message);
}
}
else
{
StorageClient storageClient = StorageClient.Create();
var obj = storageClient.GetObject(bucket, objectName);
Console.WriteLine($"Extracted file size: {obj.Size}");
}
CreateJsonSerializersSettings()
public static JsonSerializerSettings CreateJsonSerializersSettings()
Creates a set of Newtonsoft.Json.JsonSerializerSettings suitable for specifying in Google.Apis.Bigquery.v2.BigqueryService construction. The settings have Json.NET date parsing detection disabled.
Returns | |
---|---|
Type | Description |
Newtonsoft.Json.JsonSerializerSettings | A suitable set of settings. |
CreateLoadJob(IEnumerable<String>, TableReference, TableSchema, CreateLoadJobOptions)
public virtual BigQueryJob CreateLoadJob(IEnumerable<string> sourceUris, TableReference destination, TableSchema schema, CreateLoadJobOptions options = null)
Creates a job to load data from at least one Google Cloud Storage file to a BigQuery table.
Parameters | |
---|---|
Name | Description |
sourceUris | IEnumerable<String> The Google Cloud Storage URIs of the files to load. Must not be null or empty. |
destination | Google.Apis.Bigquery.v2.Data.TableReference The destination table to write data to. Must not be null. |
schema | Google.Apis.Bigquery.v2.Data.TableSchema The schema for the table. May be null if the load operation does not require a schema, such as if the table already exists, the data is being loaded from a Google Cloud Datastore backup, or if the options are set to autodetect the schema. |
options | CreateLoadJobOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
BigQueryJob | The job created for the load operation. |
To avoid confusion between source and destination tables, overloads are not provided that take the individual components of table references. Instead, use GetTableReference(String, String) or GetTableReference(String, String, String) to create table references.
See CreateLoadJob for an example using an alternative overload.
CreateLoadJob(String, TableReference, TableSchema, CreateLoadJobOptions)
public virtual BigQueryJob CreateLoadJob(string sourceUri, TableReference destination, TableSchema schema, CreateLoadJobOptions options = null)
Creates a job to load data from a Google Cloud Storage file to a BigQuery table. This method creates a single-element array and delegates to CreateLoadJob(IEnumerable<String>, TableReference, TableSchema, CreateLoadJobOptions).
Parameters | |
---|---|
Name | Description |
sourceUri | String The Google Cloud Storage URI of the file to load. Must not be null. |
destination | Google.Apis.Bigquery.v2.Data.TableReference The destination table to write data to. Must not be null. |
schema | Google.Apis.Bigquery.v2.Data.TableSchema The schema for the table. May be null if the load operation does not require a schema, such as if the table already exists, the data is being loaded from a Google Cloud Datastore backup, or if the options are set to autodetect the schema. |
options | CreateLoadJobOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
BigQueryJob | The job created for the load operation. |
To avoid confusion between source and destination tables, overloads are not provided that take the individual components of table references. Instead, use GetTableReference(String, String) or GetTableReference(String, String, String) to create table references.
BigQueryClient client = BigQueryClient.Create(projectId);
// First extract the data to Google Cloud Storage...
// (This is just a convenient way of getting data into Google Cloud Storage
// to demonstrate a load job. If you only wanted to copy a table,
// you'd create a copy job instead.)
BigQueryTable table = client.GetTable(datasetId, originalTableId);
table.CreateExtractJob(objectUri).PollUntilCompleted().ThrowOnAnyError();
TableReference newTableReference = client.GetTableReference(datasetId, newTableId);
// Then load it back again, with the same schema.
// The extracted file will contain a header row: we need to skip it when loading.
CreateLoadJobOptions options = new CreateLoadJobOptions
{
SkipLeadingRows = 1
};
BigQueryJob job = client.CreateLoadJob(objectUri, newTableReference, table.Schema, options).PollUntilCompleted();
// If there are any errors, display them.
if (job.Status.ErrorResult != null)
{
foreach (ErrorProto error in job.Status.Errors)
{
Console.WriteLine(error.Message);
}
}
CreateLoadJobAsync(IEnumerable<String>, TableReference, TableSchema, CreateLoadJobOptions, CancellationToken)
public virtual Task<BigQueryJob> CreateLoadJobAsync(IEnumerable<string> sourceUris, TableReference destination, TableSchema schema, CreateLoadJobOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously creates a job to load data from at least one Google Cloud Storage file to a BigQuery table.
Parameters | |
---|---|
Name | Description |
sourceUris | IEnumerable<String> The Google Cloud Storage URIs of the files to load. Must not be null or empty. |
destination | Google.Apis.Bigquery.v2.Data.TableReference The destination table to write data to. Must not be null. |
schema | Google.Apis.Bigquery.v2.Data.TableSchema The schema for the table. May be null if the load operation does not require a schema, such as if the table already exists, the data is being loaded from a Google Cloud Datastore backup, or if the options are set to autodetect the schema. |
options | CreateLoadJobOptions 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 load operation. |
To avoid confusion between source and destination tables, overloads are not provided that take the individual components of table references. Instead, use GetTableReference(String, String) or GetTableReference(String, String, String) to create table references.
See CreateLoadJob for an example using an alternative overload.
CreateLoadJobAsync(String, TableReference, TableSchema, CreateLoadJobOptions, CancellationToken)
public virtual Task<BigQueryJob> CreateLoadJobAsync(string sourceUri, TableReference destination, TableSchema schema, CreateLoadJobOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously creates a job to load data from a Google Cloud Storage file to a BigQuery table. This method creates a single-element array and delegates to CreateLoadJobAsync(IEnumerable<String>, TableReference, TableSchema, CreateLoadJobOptions, CancellationToken).
Parameters | |
---|---|
Name | Description |
sourceUri | String The Google Cloud Storage URI of the file to load. Must not be null. |
destination | Google.Apis.Bigquery.v2.Data.TableReference The destination table to write data to. Must not be null. |
schema | Google.Apis.Bigquery.v2.Data.TableSchema The schema for the table. May be null if the load operation does not require a schema, such as if the table already exists, the data is being loaded from a Google Cloud Datastore backup, or if the options are set to autodetect the schema. |
options | CreateLoadJobOptions 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 load operation. |
To avoid confusion between source and destination tables, overloads are not provided that take the individual components of table references. Instead, use GetTableReference(String, String) or GetTableReference(String, String, String) to create table references.
BigQueryClient client = BigQueryClient.Create(projectId);
// First extract the data to Google Cloud Storage...
// (This is just a convenient way of getting data into Google Cloud Storage
// to demonstrate a load job. If you only wanted to copy a table,
// you'd create a copy job instead.)
BigQueryTable table = await client.GetTableAsync(datasetId, originalTableId);
var extractJob = await table.CreateExtractJobAsync(objectUri);
extractJob = (await extractJob.PollUntilCompletedAsync()).ThrowOnAnyError();
TableReference newTableReference = client.GetTableReference(datasetId, newTableId);
// Then load it back again, with the same schema.
// The extracted file will contain a header row: we need to skip it when loading.
CreateLoadJobOptions options = new CreateLoadJobOptions
{
SkipLeadingRows = 1
};
BigQueryJob job = await client.CreateLoadJobAsync(objectUri, newTableReference, table.Schema, options);
await job.PollUntilCompletedAsync();
// If there are any errors, display them.
if (job.Status.ErrorResult != null)
{
foreach (ErrorProto error in job.Status.Errors)
{
Console.WriteLine(error.Message);
}
}
CreateModelExtractJob(ModelReference, IEnumerable<String>, CreateModelExtractJobOptions)
public virtual BigQueryJob CreateModelExtractJob(ModelReference modelReference, IEnumerable<string> destinationUris, CreateModelExtractJobOptions options = null)
Creates a job to extract the specified BigQuery model to Google Cloud Storage. See the BigQuery documentation for more information on model extract jobs.
Parameters | |
---|---|
Name | Description |
modelReference | Google.Apis.Bigquery.v2.Data.ModelReference A fully-qualified identifier for the model. Must not be null. |
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(ModelReference, String, CreateModelExtractJobOptions)
public virtual BigQueryJob CreateModelExtractJob(ModelReference modelReference, string destinationUri, CreateModelExtractJobOptions options = null)
Creates a job to extract the specified BigQuery model to Google Cloud Storage. See the BigQuery documentation for more information on model extract jobs.
Parameters | |
---|---|
Name | Description |
modelReference | Google.Apis.Bigquery.v2.Data.ModelReference A fully-qualified identifier for the model. Must not be null. |
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. |
CreateModelExtractJob(String, String, IEnumerable<String>, CreateModelExtractJobOptions)
public virtual BigQueryJob CreateModelExtractJob(string datasetId, string modelId, IEnumerable<string> destinationUris, CreateModelExtractJobOptions options = null)
Creates a job to extract the specified BigQuery 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 |
datasetId | String The dataset ID. Must not be null. |
modelId | String The model ID. Must not be null. |
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, String, String, CreateModelExtractJobOptions)
public virtual BigQueryJob CreateModelExtractJob(string datasetId, string modelId, string destinationUri, CreateModelExtractJobOptions options = null)
Creates a job to extract the specified BigQuery 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 |
datasetId | String The dataset ID. Must not be null. |
modelId | String The model ID. Must not be null. |
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. |
CreateModelExtractJob(String, String, String, IEnumerable<String>, CreateModelExtractJobOptions)
public virtual BigQueryJob CreateModelExtractJob(string projectId, string datasetId, string modelId, IEnumerable<string> destinationUris, CreateModelExtractJobOptions options = null)
Creates a job to extract the specified BigQuery 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 |
projectId | String The project ID. Must not be null. |
datasetId | String The dataset ID. Must not be null. |
modelId | String The model ID. Must not be null. |
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, String, String, String, CreateModelExtractJobOptions)
public virtual BigQueryJob CreateModelExtractJob(string projectId, string datasetId, string modelId, string destinationUri, CreateModelExtractJobOptions options = null)
Creates a job to extract the specified BigQuery 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 |
projectId | String The project ID. Must not be null. |
datasetId | String The dataset ID. Must not be null. |
modelId | String The model ID. Must not be null. |
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(ModelReference, IEnumerable<String>, CreateModelExtractJobOptions, CancellationToken)
public virtual Task<BigQueryJob> CreateModelExtractJobAsync(ModelReference modelReference, IEnumerable<string> destinationUris, CreateModelExtractJobOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously creates a job to extract the specified BigQuery model to Google Cloud Storage. See the BigQuery documentation for more information on model extract jobs.
Parameters | |
---|---|
Name | Description |
modelReference | Google.Apis.Bigquery.v2.Data.ModelReference A fully-qualified identifier for the model. Must not be null. |
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(ModelReference, String, CreateModelExtractJobOptions, CancellationToken)
public virtual Task<BigQueryJob> CreateModelExtractJobAsync(ModelReference modelReference, string destinationUri, CreateModelExtractJobOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously creates a job to extract the specified BigQuery model to Google Cloud Storage. See the BigQuery documentation for more information on model extract jobs.
Parameters | |
---|---|
Name | Description |
modelReference | Google.Apis.Bigquery.v2.Data.ModelReference A fully-qualified identifier for the model. Must not be null. |
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. |
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, String, IEnumerable<String>, CreateModelExtractJobOptions, CancellationToken)
public virtual Task<BigQueryJob> CreateModelExtractJobAsync(string datasetId, string modelId, IEnumerable<string> destinationUris, CreateModelExtractJobOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously creates a job to extract the specified BigQuery 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 |
datasetId | String The dataset ID. Must not be null. |
modelId | String The model ID. Must not be null. |
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, String, String, CreateModelExtractJobOptions, CancellationToken)
public virtual Task<BigQueryJob> CreateModelExtractJobAsync(string datasetId, string modelId, string destinationUri, CreateModelExtractJobOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously creates a job to extract the specified BigQuery 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 |
datasetId | String The dataset ID. Must not be null. |
modelId | String The model ID. Must not be null. |
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. |
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, String, String, IEnumerable<String>, CreateModelExtractJobOptions, CancellationToken)
public virtual Task<BigQueryJob> CreateModelExtractJobAsync(string projectId, string datasetId, string modelId, IEnumerable<string> destinationUris, CreateModelExtractJobOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously creates a job to extract the specified BigQuery 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 |
projectId | String The project ID. Must not be null. |
datasetId | String The dataset ID. Must not be null. |
modelId | String The model ID. Must not be null. |
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, String, String, String, CreateModelExtractJobOptions, CancellationToken)
public virtual Task<BigQueryJob> CreateModelExtractJobAsync(string projectId, string datasetId, string modelId, string destinationUri, CreateModelExtractJobOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously creates a job to extract the specified BigQuery 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 |
projectId | String The project ID. Must not be null. |
datasetId | String The dataset ID. Must not be null. |
modelId | String The model ID. Must not be null. |
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. |
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. |
CreateQueryJob(String, IEnumerable<BigQueryParameter>, QueryOptions)
public virtual BigQueryJob CreateQueryJob(string sql, IEnumerable<BigQueryParameter> parameters, QueryOptions options = null)
Creates a job for a SQL query.
Parameters | |
---|---|
Name | Description |
sql | String The SQL query. Must not be null. |
parameters | IEnumerable<BigQueryParameter> The parameters for the query. May be null, which is equivalent to specifying an empty list of parameters. Must not contain null elements. |
options | QueryOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
BigQueryJob | The query job created. Use GetQueryResults(JobReference, GetQueryResultsOptions) to retrieve the results of the query. |
BigQueryClient client = BigQueryClient.Create(projectId);
BigQueryTable table = client.GetTable(datasetId, historyTableId);
TableReference destination = client.GetTableReference(datasetId, queryTableId);
// If the destination table is not specified, the results will be stored in
// a temporary table.
BigQueryJob job = client.CreateQueryJob(
$@"SELECT player, MAX(score) AS score
FROM {table}
GROUP BY player
ORDER BY score DESC",
null, // No parameters
new QueryOptions { DestinationTable = destination });
// Wait for the job to complete.
job.PollUntilCompleted();
// Then we can fetch the results, either via the job or by accessing
// the destination table.
BigQueryResults result = client.GetQueryResults(job.Reference);
foreach (BigQueryRow row in result)
{
Console.WriteLine($"{row["player"]}: {row["score"]}");
}
CreateQueryJobAsync(String, IEnumerable<BigQueryParameter>, QueryOptions, CancellationToken)
public virtual Task<BigQueryJob> CreateQueryJobAsync(string sql, IEnumerable<BigQueryParameter> parameters, QueryOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously creates a job for a SQL query.
Parameters | |
---|---|
Name | Description |
sql | String The SQL query. Must not be null. |
parameters | IEnumerable<BigQueryParameter> The parameters for the query. May be null, which is equivalent to specifying an empty list of parameters. Must not contain null elements. |
options | QueryOptions 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 query job created. Use GetQueryResultsAsync(JobReference, GetQueryResultsOptions, CancellationToken) to retrieve the results of the query. |
BigQueryClient client = await BigQueryClient.CreateAsync(projectId);
BigQueryTable table = await client.GetTableAsync(datasetId, historyTableId);
TableReference destination = client.GetTableReference(datasetId, queryTableId);
// If the destination table is not specified, the results will be stored in
// a temporary table.
BigQueryJob job = await client.CreateQueryJobAsync(
$@"SELECT player, MAX(score) AS score
FROM {table}
GROUP BY player
ORDER BY score DESC",
null, // No parameters
new QueryOptions { DestinationTable = destination });
// Wait for the job to complete.
await job.PollUntilCompletedAsync();
// Then we can fetch the results, either via the job or by accessing
// the destination table.
BigQueryResults result = await client.GetQueryResultsAsync(job.Reference);
await result.GetRowsAsync().ForEachAsync(row =>
{
Console.WriteLine($"{row["player"]}: {row["score"]}");
});
CreateRoutine(RoutineReference, Routine, CreateRoutineOptions)
public virtual BigQueryRoutine CreateRoutine(RoutineReference routineReference, Routine resource, CreateRoutineOptions options = null)
Creates the specified routine.
Parameters | |
---|---|
Name | Description |
routineReference | Google.Apis.Bigquery.v2.Data.RoutineReference A fully-qualified identifier for the routine. Must not be null. |
resource | Google.Apis.Bigquery.v2.Data.Routine The routine resource representation to use for the creation. Must not be null. If this routine's Google.Apis.Bigquery.v2.Data.Routine.RoutineReference is specified, then it must be the same as the one obtained from the other parameters, else it will be set to the one obtained from the other parameters. |
options | CreateRoutineOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
BigQueryRoutine | The newly created routine. |
CreateRoutine(String, String, Routine, CreateRoutineOptions)
public virtual BigQueryRoutine CreateRoutine(string datasetId, string routineId, Routine resource, CreateRoutineOptions options = null)
Creates the specified routine within this client's project. This method just creates a Google.Apis.Bigquery.v2.Data.RoutineReference and delegates to CreateRoutine(RoutineReference, Routine, CreateRoutineOptions).
Parameters | |
---|---|
Name | Description |
datasetId | String The dataset ID. Must not be null. |
routineId | String The routine ID. Must not be null. |
resource | Google.Apis.Bigquery.v2.Data.Routine The routine resource representation to use for the creation. Must not be null. If this routine's Google.Apis.Bigquery.v2.Data.Routine.RoutineReference is specified, then it must be the same as the one obtained from the other parameters, else it will be set to the one obtained from the other parameters. |
options | CreateRoutineOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
BigQueryRoutine | The newly created routine. |
CreateRoutine(String, String, String, Routine, CreateRoutineOptions)
public virtual BigQueryRoutine CreateRoutine(string projectId, string datasetId, string routineId, Routine resource, CreateRoutineOptions options = null)
Creates the specified routine. This method just creates a Google.Apis.Bigquery.v2.Data.RoutineReference and delegates to CreateRoutine(RoutineReference, Routine, CreateRoutineOptions).
Parameters | |
---|---|
Name | Description |
projectId | String The project ID. Must not be null. |
datasetId | String The dataset ID. Must not be null. |
routineId | String The routine ID. Must not be null. |
resource | Google.Apis.Bigquery.v2.Data.Routine The routine resource representation to use for the creation. Must not be null. If this routine's Google.Apis.Bigquery.v2.Data.Routine.RoutineReference is specified, then it must be the same as the one obtained from the other parameters, else it will be set to the one obtained from the other parameters. |
options | CreateRoutineOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
BigQueryRoutine | The newly created routine. |
CreateRoutineAsync(RoutineReference, Routine, CreateRoutineOptions, CancellationToken)
public virtual Task<BigQueryRoutine> CreateRoutineAsync(RoutineReference routineReference, Routine resource, CreateRoutineOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously creates the specified routine.
Parameters | |
---|---|
Name | Description |
routineReference | Google.Apis.Bigquery.v2.Data.RoutineReference A fully-qualified identifier for the routine. Must not be null. |
resource | Google.Apis.Bigquery.v2.Data.Routine The routine resource representation to use for the creation. Must not be null. If this routine's Google.Apis.Bigquery.v2.Data.Routine.RoutineReference is specified, then it must be the same as the one obtained from the other parameters, else it will be set to the one obtained from the other parameters. |
options | CreateRoutineOptions 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<BigQueryRoutine> | A task representing the asynchronous operation. When complete, the result is the newly created routine. |
CreateRoutineAsync(String, String, Routine, CreateRoutineOptions, CancellationToken)
public virtual Task<BigQueryRoutine> CreateRoutineAsync(string datasetId, string routineId, Routine resource, CreateRoutineOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously creates the specified routine within this client's project. This method just creates a Google.Apis.Bigquery.v2.Data.RoutineReference and delegates to CreateRoutineAsync(RoutineReference, Routine, CreateRoutineOptions, CancellationToken).
Parameters | |
---|---|
Name | Description |
datasetId | String The dataset ID. Must not be null. |
routineId | String The routine ID. Must not be null. |
resource | Google.Apis.Bigquery.v2.Data.Routine The routine resource representation to use for the creation. Must not be null. If this routine's Google.Apis.Bigquery.v2.Data.Routine.RoutineReference is specified, then it must be the same as the one obtained from the other parameters, else it will be set to the one obtained from the other parameters. |
options | CreateRoutineOptions 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<BigQueryRoutine> | A task representing the asynchronous operation. When complete, the result is the newly created routine. |
CreateRoutineAsync(String, String, String, Routine, CreateRoutineOptions, CancellationToken)
public virtual Task<BigQueryRoutine> CreateRoutineAsync(string projectId, string datasetId, string routineId, Routine resource, CreateRoutineOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously creates the specified routine. This method just creates a Google.Apis.Bigquery.v2.Data.RoutineReference and delegates to CreateRoutineAsync(RoutineReference, Routine, CreateRoutineOptions, CancellationToken).
Parameters | |
---|---|
Name | Description |
projectId | String The project ID. Must not be null. |
datasetId | String The dataset ID. Must not be null. |
routineId | String The routine ID. Must not be null. |
resource | Google.Apis.Bigquery.v2.Data.Routine The routine resource representation to use for the creation. Must not be null. If this routine's Google.Apis.Bigquery.v2.Data.Routine.RoutineReference is specified, then it must be the same as the one obtained from the other parameters, else it will be set to the one obtained from the other parameters. |
options | CreateRoutineOptions 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<BigQueryRoutine> | A task representing the asynchronous operation. When complete, the result is the newly created routine. |
CreateTable(TableReference, Table, CreateTableOptions)
public virtual BigQueryTable CreateTable(TableReference tableReference, Table resource, CreateTableOptions options = null)
Creates the specified table.
Parameters | |
---|---|
Name | Description |
tableReference | Google.Apis.Bigquery.v2.Data.TableReference A fully-qualified identifier for the table. Must not be null. |
resource | Google.Apis.Bigquery.v2.Data.Table The table resource representation to use for the creation. Must not be null. If this table's Google.Apis.Bigquery.v2.Data.Table.TableReference is specified, then it must be the same as the one obtained from the other parameters, else it will be set to the one obtained from the other parameters. |
options | CreateTableOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
BigQueryTable | The newly created table. |
See CreateTable for an example using an alternative overload.
CreateTable(TableReference, TableSchema, CreateTableOptions)
public virtual BigQueryTable CreateTable(TableReference tableReference, TableSchema schema, CreateTableOptions options = null)
Creates the specified table.
Parameters | |
---|---|
Name | Description |
tableReference | Google.Apis.Bigquery.v2.Data.TableReference A fully-qualified identifier for the table. Must not be null. |
schema | Google.Apis.Bigquery.v2.Data.TableSchema The schema for the new table. Must not be null. |
options | CreateTableOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
BigQueryTable | The newly created table. |
See CreateTable for an example using an alternative overload.
CreateTable(String, String, Table, CreateTableOptions)
public virtual BigQueryTable CreateTable(string datasetId, string tableId, Table resource, CreateTableOptions options = null)
Creates the specified table within this client's project. This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to CreateTable(TableReference, Table, CreateTableOptions).
Parameters | |
---|---|
Name | Description |
datasetId | String The dataset ID. Must not be null. |
tableId | String The table ID. Must not be null. |
resource | Google.Apis.Bigquery.v2.Data.Table The table resource representation to use for the creation. Must not be null. If this table's Google.Apis.Bigquery.v2.Data.Table.TableReference is specified, then it must be the same as the one obtained from the other parameters, else it will be set to the one obtained from the other parameters. |
options | CreateTableOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
BigQueryTable | The newly created table. |
See CreateTable for an example using an alternative overload.
CreateTable(String, String, TableSchema, CreateTableOptions)
public virtual BigQueryTable CreateTable(string datasetId, string tableId, TableSchema schema, CreateTableOptions options = null)
Creates the specified table within this client's project. This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to CreateTable(TableReference, TableSchema, CreateTableOptions).
Parameters | |
---|---|
Name | Description |
datasetId | String The dataset ID. Must not be null. |
tableId | String The table ID. Must not be null. |
schema | Google.Apis.Bigquery.v2.Data.TableSchema The schema for the new table. Must not be null. |
options | CreateTableOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
BigQueryTable | The newly created table. |
BigQueryClient client = BigQueryClient.Create(projectId);
TableSchema schema = new TableSchemaBuilder
{
{ "from_player", BigQueryDbType.String },
{ "to_player", BigQueryDbType.String },
{ "message", BigQueryDbType.String }
}.Build();
BigQueryTable table = client.CreateTable(datasetId, tableId, schema);
// Now populate the table with data...
CreateTable(String, String, String, Table, CreateTableOptions)
public virtual BigQueryTable CreateTable(string projectId, string datasetId, string tableId, Table resource, CreateTableOptions options = null)
Creates the specified table. This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to CreateTable(TableReference, Table, CreateTableOptions).
Parameters | |
---|---|
Name | Description |
projectId | String The project ID. Must not be null. |
datasetId | String The dataset ID. Must not be null. |
tableId | String The table ID. Must not be null. |
resource | Google.Apis.Bigquery.v2.Data.Table The table resource representation to use for the creation. Must not be null. If this table's Google.Apis.Bigquery.v2.Data.Table.TableReference is specified, then it must be the same as the one obtained from the other parameters, else it will be set to the one obtained from the other parameters. |
options | CreateTableOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
BigQueryTable | The newly created table. |
See CreateTable for an example using an alternative overload.
CreateTable(String, String, String, TableSchema, CreateTableOptions)
public virtual BigQueryTable CreateTable(string projectId, string datasetId, string tableId, TableSchema schema, CreateTableOptions options = null)
Creates the specified table. This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to CreateTable(TableReference, TableSchema, CreateTableOptions).
Parameters | |
---|---|
Name | Description |
projectId | String The project ID. Must not be null. |
datasetId | String The dataset ID. Must not be null. |
tableId | String The table ID. Must not be null. |
schema | Google.Apis.Bigquery.v2.Data.TableSchema The schema for the new table. Must not be null. |
options | CreateTableOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
BigQueryTable | The newly created table. |
See CreateTable for an example using an alternative overload.
CreateTableAsync(TableReference, Table, CreateTableOptions, CancellationToken)
public virtual Task<BigQueryTable> CreateTableAsync(TableReference tableReference, Table resource, CreateTableOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously creates the specified table.
Parameters | |
---|---|
Name | Description |
tableReference | Google.Apis.Bigquery.v2.Data.TableReference A fully-qualified identifier for the table. Must not be null. |
resource | Google.Apis.Bigquery.v2.Data.Table The table resource representation to use for the creation. Must not be null. If this table's Google.Apis.Bigquery.v2.Data.Table.TableReference is specified, then it must be the same as the one obtained from the other parameters, else it will be set to the one obtained from the other parameters. |
options | CreateTableOptions 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<BigQueryTable> | A task representing the asynchronous operation. When complete, the result is the newly created table. |
See CreateTableAsync for an example using an alternative overload.
CreateTableAsync(TableReference, TableSchema, CreateTableOptions, CancellationToken)
public virtual Task<BigQueryTable> CreateTableAsync(TableReference tableReference, TableSchema schema, CreateTableOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously creates the specified table.
Parameters | |
---|---|
Name | Description |
tableReference | Google.Apis.Bigquery.v2.Data.TableReference A fully-qualified identifier for the table. Must not be null. |
schema | Google.Apis.Bigquery.v2.Data.TableSchema The schema for the new table. Must not be null. |
options | CreateTableOptions 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<BigQueryTable> | A task representing the asynchronous operation. When complete, the result is the newly created table. |
See CreateTableAsync for an example using an alternative overload.
CreateTableAsync(String, String, Table, CreateTableOptions, CancellationToken)
public virtual Task<BigQueryTable> CreateTableAsync(string datasetId, string tableId, Table resource, CreateTableOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously creates the specified table within this client's project. This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to CreateTableAsync(TableReference, Table, CreateTableOptions, CancellationToken).
Parameters | |
---|---|
Name | Description |
datasetId | String The dataset ID. Must not be null. |
tableId | String The table ID. Must not be null. |
resource | Google.Apis.Bigquery.v2.Data.Table The table resource representation to use for the creation. Must not be null. If this table's Google.Apis.Bigquery.v2.Data.Table.TableReference is specified, then it must be the same as the one obtained from the other parameters, else it will be set to the one obtained from the other parameters. |
options | CreateTableOptions 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<BigQueryTable> | A task representing the asynchronous operation. When complete, the result is the newly created table. |
See CreateTableAsync for an example using an alternative overload.
CreateTableAsync(String, String, TableSchema, CreateTableOptions, CancellationToken)
public virtual Task<BigQueryTable> CreateTableAsync(string datasetId, string tableId, TableSchema schema, CreateTableOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously creates the specified table within this client's project. This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to CreateTableAsync(TableReference, TableSchema, CreateTableOptions, CancellationToken).
Parameters | |
---|---|
Name | Description |
datasetId | String The dataset ID. Must not be null. |
tableId | String The table ID. Must not be null. |
schema | Google.Apis.Bigquery.v2.Data.TableSchema The schema for the new table. Must not be null. |
options | CreateTableOptions 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<BigQueryTable> | A task representing the asynchronous operation. When complete, the result is the newly created table. |
BigQueryClient client = await BigQueryClient.CreateAsync(projectId);
TableSchema schema = new TableSchemaBuilder
{
{ "from_player", BigQueryDbType.String },
{ "to_player", BigQueryDbType.String },
{ "message", BigQueryDbType.String }
}.Build();
BigQueryTable table = await client.CreateTableAsync(datasetId, tableId, schema);
// Now populate the table with data...
CreateTableAsync(String, String, String, Table, CreateTableOptions, CancellationToken)
public virtual Task<BigQueryTable> CreateTableAsync(string projectId, string datasetId, string tableId, Table resource, CreateTableOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously creates the specified table. This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to CreateTableAsync(TableReference, Table, CreateTableOptions, CancellationToken).
Parameters | |
---|---|
Name | Description |
projectId | String The project ID. Must not be null. |
datasetId | String The dataset ID. Must not be null. |
tableId | String The table ID. Must not be null. |
resource | Google.Apis.Bigquery.v2.Data.Table The table resource representation to use for the creation. Must not be null. If this table's Google.Apis.Bigquery.v2.Data.Table.TableReference is specified, then it must be the same as the one obtained from the other parameters, else it will be set to the one obtained from the other parameters. |
options | CreateTableOptions 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<BigQueryTable> | A task representing the asynchronous operation. When complete, the result is the newly created table. |
See CreateTableAsync for an example using an alternative overload.
CreateTableAsync(String, String, String, TableSchema, CreateTableOptions, CancellationToken)
public virtual Task<BigQueryTable> CreateTableAsync(string projectId, string datasetId, string tableId, TableSchema schema, CreateTableOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously creates the specified table. This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to CreateTableAsync(TableReference, TableSchema, CreateTableOptions, CancellationToken).
Parameters | |
---|---|
Name | Description |
projectId | String The project ID. Must not be null. |
datasetId | String The dataset ID. Must not be null. |
tableId | String The table ID. Must not be null. |
schema | Google.Apis.Bigquery.v2.Data.TableSchema The schema for the new table. Must not be null. |
options | CreateTableOptions 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<BigQueryTable> | A task representing the asynchronous operation. When complete, the result is the newly created table. |
See CreateTableAsync for an example using an alternative overload.
DeleteDataset(DatasetReference, DeleteDatasetOptions)
public virtual void DeleteDataset(DatasetReference datasetReference, DeleteDatasetOptions options = null)
Deletes the specified dataset.
Parameters | |
---|---|
Name | Description |
datasetReference | Google.Apis.Bigquery.v2.Data.DatasetReference A fully-qualified identifier for the dataset. Must not be null. |
options | DeleteDatasetOptions The options for the operation. May be null, in which case defaults will be supplied. |
See DeleteDataset for an example using an alternative overload.
DeleteDataset(String, DeleteDatasetOptions)
public virtual void DeleteDataset(string datasetId, DeleteDatasetOptions options = null)
Deletes the specified dataset within this client's project. This method just creates a Google.Apis.Bigquery.v2.Data.DatasetReference and delegates to DeleteDataset(DatasetReference, DeleteDatasetOptions).
Parameters | |
---|---|
Name | Description |
datasetId | String The dataset ID. Must not be null. |
options | DeleteDatasetOptions The options for the operation. May be null, in which case defaults will be supplied. |
BigQueryClient client = BigQueryClient.Create(projectId);
client.DeleteDataset(datasetId);
DeleteDataset(String, String, DeleteDatasetOptions)
public virtual void DeleteDataset(string projectId, string datasetId, DeleteDatasetOptions options = null)
Deletes the specified dataset. This method just creates a Google.Apis.Bigquery.v2.Data.DatasetReference and delegates to DeleteDataset(DatasetReference, DeleteDatasetOptions).
Parameters | |
---|---|
Name | Description |
projectId | String The project ID. Must not be null. |
datasetId | String The dataset ID. Must not be null. |
options | DeleteDatasetOptions The options for the operation. May be null, in which case defaults will be supplied. |
See DeleteDataset for an example using an alternative overload.
DeleteDatasetAsync(DatasetReference, DeleteDatasetOptions, CancellationToken)
public virtual Task DeleteDatasetAsync(DatasetReference datasetReference, DeleteDatasetOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously deletes the specified dataset.
Parameters | |
---|---|
Name | Description |
datasetReference | Google.Apis.Bigquery.v2.Data.DatasetReference A fully-qualified identifier for the dataset. Must not be null. |
options | DeleteDatasetOptions 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. |
See DeleteDatasetAsync for an example using an alternative overload.
DeleteDatasetAsync(String, DeleteDatasetOptions, CancellationToken)
public virtual Task DeleteDatasetAsync(string datasetId, DeleteDatasetOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously deletes the specified dataset within this client's project. This method just creates a Google.Apis.Bigquery.v2.Data.DatasetReference and delegates to DeleteDatasetAsync(DatasetReference, DeleteDatasetOptions, CancellationToken).
Parameters | |
---|---|
Name | Description |
datasetId | String The dataset ID. Must not be null. |
options | DeleteDatasetOptions 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. |
BigQueryClient client = await BigQueryClient.CreateAsync(projectId);
await client.DeleteDatasetAsync(datasetId);
DeleteDatasetAsync(String, String, DeleteDatasetOptions, CancellationToken)
public virtual Task DeleteDatasetAsync(string projectId, string datasetId, DeleteDatasetOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously deletes the specified dataset. This method just creates a Google.Apis.Bigquery.v2.Data.DatasetReference and delegates to DeleteDatasetAsync(DatasetReference, DeleteDatasetOptions, CancellationToken).
Parameters | |
---|---|
Name | Description |
projectId | String The project ID. Must not be null. |
datasetId | String The dataset ID. Must not be null. |
options | DeleteDatasetOptions 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. |
See DeleteDatasetAsync for an example using an alternative overload.
DeleteJob(JobReference, DeleteJobOptions)
public virtual void DeleteJob(JobReference jobReference, DeleteJobOptions options = null)
Deletes the specified job.
Parameters | |
---|---|
Name | Description |
jobReference | Google.Apis.Bigquery.v2.Data.JobReference A fully-qualified identifier for the job. Must not be null. |
options | DeleteJobOptions The options for the operation. May be null, in which case defaults will be supplied. |
DeleteJob(String, DeleteJobOptions)
public virtual void DeleteJob(string jobId, DeleteJobOptions options = null)
Deletes the specified job within this client's project. This method just creates a Google.Apis.Bigquery.v2.Data.JobReference and delegates to DeleteJob(JobReference, DeleteJobOptions).
Parameters | |
---|---|
Name | Description |
jobId | String The job ID. Must not be null. |
options | DeleteJobOptions The options for the operation. May be null, in which case defaults will be supplied. |
DeleteJob(String, String, DeleteJobOptions)
public virtual void DeleteJob(string projectId, string jobId, DeleteJobOptions options = null)
Deletes the specified job. This method just creates a Google.Apis.Bigquery.v2.Data.JobReference and delegates to DeleteJob(JobReference, DeleteJobOptions).
Parameters | |
---|---|
Name | Description |
projectId | String The project ID. Must not be null. |
jobId | String The job ID. Must not be null. |
options | DeleteJobOptions The options for the operation. May be null, in which case defaults will be supplied. |
DeleteJobAsync(JobReference, DeleteJobOptions, CancellationToken)
public virtual Task DeleteJobAsync(JobReference jobReference, DeleteJobOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously deletes the specified job.
Parameters | |
---|---|
Name | Description |
jobReference | Google.Apis.Bigquery.v2.Data.JobReference A fully-qualified identifier for the job. Must not be null. |
options | DeleteJobOptions 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. |
DeleteJobAsync(String, DeleteJobOptions, CancellationToken)
public virtual Task DeleteJobAsync(string jobId, DeleteJobOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously deletes the specified job within this client's project. This method just creates a Google.Apis.Bigquery.v2.Data.JobReference and delegates to DeleteJobAsync(JobReference, DeleteJobOptions, CancellationToken).
Parameters | |
---|---|
Name | Description |
jobId | String The job ID. Must not be null. |
options | DeleteJobOptions 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. |
DeleteJobAsync(String, String, DeleteJobOptions, CancellationToken)
public virtual Task DeleteJobAsync(string projectId, string jobId, DeleteJobOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously deletes the specified job. This method just creates a Google.Apis.Bigquery.v2.Data.JobReference and delegates to DeleteJobAsync(JobReference, DeleteJobOptions, CancellationToken).
Parameters | |
---|---|
Name | Description |
projectId | String The project ID. Must not be null. |
jobId | String The job ID. Must not be null. |
options | DeleteJobOptions 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. |
DeleteModel(ModelReference, DeleteModelOptions)
public virtual void DeleteModel(ModelReference modelReference, DeleteModelOptions options = null)
Deletes the specified model.
Parameters | |
---|---|
Name | Description |
modelReference | Google.Apis.Bigquery.v2.Data.ModelReference A fully-qualified identifier for the model. Must not be null. |
options | DeleteModelOptions The options for the operation. May be null, in which case defaults will be supplied. |
DeleteModel(String, String, DeleteModelOptions)
public virtual void DeleteModel(string datasetId, string modelId, DeleteModelOptions options = null)
Deletes the specified model within this client's project. This method just creates a Google.Apis.Bigquery.v2.Data.ModelReference and delegates to DeleteModel(ModelReference, DeleteModelOptions).
Parameters | |
---|---|
Name | Description |
datasetId | String The dataset ID. Must not be null. |
modelId | String The model ID. Must not be null. |
options | DeleteModelOptions The options for the operation. May be null, in which case defaults will be supplied. |
DeleteModel(String, String, String, DeleteModelOptions)
public virtual void DeleteModel(string projectId, string datasetId, string modelId, DeleteModelOptions options = null)
Deletes the specified model. This method just creates a Google.Apis.Bigquery.v2.Data.ModelReference and delegates to DeleteModel(ModelReference, DeleteModelOptions).
Parameters | |
---|---|
Name | Description |
projectId | String The project ID. Must not be null. |
datasetId | String The dataset ID. Must not be null. |
modelId | String The model ID. Must not be null. |
options | DeleteModelOptions The options for the operation. May be null, in which case defaults will be supplied. |
DeleteModelAsync(ModelReference, DeleteModelOptions, CancellationToken)
public virtual Task DeleteModelAsync(ModelReference modelReference, DeleteModelOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously deletes the specified model.
Parameters | |
---|---|
Name | Description |
modelReference | Google.Apis.Bigquery.v2.Data.ModelReference A fully-qualified identifier for the model. Must not be null. |
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. |
DeleteModelAsync(String, String, DeleteModelOptions, CancellationToken)
public virtual Task DeleteModelAsync(string datasetId, string modelId, DeleteModelOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously deletes the specified model within this client's project. This method just creates a Google.Apis.Bigquery.v2.Data.ModelReference and delegates to DeleteModelAsync(ModelReference, DeleteModelOptions, CancellationToken).
Parameters | |
---|---|
Name | Description |
datasetId | String The dataset ID. Must not be null. |
modelId | String The model ID. Must not be null. |
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. |
DeleteModelAsync(String, String, String, DeleteModelOptions, CancellationToken)
public virtual Task DeleteModelAsync(string projectId, string datasetId, string modelId, DeleteModelOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously deletes the specified model. This method just creates a Google.Apis.Bigquery.v2.Data.ModelReference and delegates to DeleteModelAsync(ModelReference, DeleteModelOptions, CancellationToken).
Parameters | |
---|---|
Name | Description |
projectId | String The project ID. Must not be null. |
datasetId | String The dataset ID. Must not be null. |
modelId | String The model ID. Must not be null. |
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. |
DeleteRoutine(RoutineReference, DeleteRoutineOptions)
public virtual void DeleteRoutine(RoutineReference routineReference, DeleteRoutineOptions options = null)
Deletes the specified routine.
Parameters | |
---|---|
Name | Description |
routineReference | Google.Apis.Bigquery.v2.Data.RoutineReference A fully-qualified identifier for the routine. Must not be null. |
options | DeleteRoutineOptions The options for the operation. May be null, in which case defaults will be supplied. |
DeleteRoutine(String, String, DeleteRoutineOptions)
public virtual void DeleteRoutine(string datasetId, string routineId, DeleteRoutineOptions options = null)
Deletes the specified routine within this client's project. This method just creates a Google.Apis.Bigquery.v2.Data.RoutineReference and delegates to DeleteRoutine(RoutineReference, DeleteRoutineOptions).
Parameters | |
---|---|
Name | Description |
datasetId | String The dataset ID. Must not be null. |
routineId | String The routine ID. Must not be null. |
options | DeleteRoutineOptions The options for the operation. May be null, in which case defaults will be supplied. |
DeleteRoutine(String, String, String, DeleteRoutineOptions)
public virtual void DeleteRoutine(string projectId, string datasetId, string routineId, DeleteRoutineOptions options = null)
Deletes the specified routine. This method just creates a Google.Apis.Bigquery.v2.Data.RoutineReference and delegates to DeleteRoutine(RoutineReference, DeleteRoutineOptions).
Parameters | |
---|---|
Name | Description |
projectId | String The project ID. Must not be null. |
datasetId | String The dataset ID. Must not be null. |
routineId | String The routine ID. Must not be null. |
options | DeleteRoutineOptions The options for the operation. May be null, in which case defaults will be supplied. |
DeleteRoutineAsync(RoutineReference, DeleteRoutineOptions, CancellationToken)
public virtual Task DeleteRoutineAsync(RoutineReference routineReference, DeleteRoutineOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously deletes the specified routine.
Parameters | |
---|---|
Name | Description |
routineReference | Google.Apis.Bigquery.v2.Data.RoutineReference A fully-qualified identifier for the routine. Must not be null. |
options | DeleteRoutineOptions 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. |
DeleteRoutineAsync(String, String, DeleteRoutineOptions, CancellationToken)
public virtual Task DeleteRoutineAsync(string datasetId, string routineId, DeleteRoutineOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously deletes the specified routine within this client's project. This method just creates a Google.Apis.Bigquery.v2.Data.RoutineReference and delegates to DeleteRoutineAsync(RoutineReference, DeleteRoutineOptions, CancellationToken).
Parameters | |
---|---|
Name | Description |
datasetId | String The dataset ID. Must not be null. |
routineId | String The routine ID. Must not be null. |
options | DeleteRoutineOptions 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. |
DeleteRoutineAsync(String, String, String, DeleteRoutineOptions, CancellationToken)
public virtual Task DeleteRoutineAsync(string projectId, string datasetId, string routineId, DeleteRoutineOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously deletes the specified routine. This method just creates a Google.Apis.Bigquery.v2.Data.RoutineReference and delegates to DeleteRoutineAsync(RoutineReference, DeleteRoutineOptions, CancellationToken).
Parameters | |
---|---|
Name | Description |
projectId | String The project ID. Must not be null. |
datasetId | String The dataset ID. Must not be null. |
routineId | String The routine ID. Must not be null. |
options | DeleteRoutineOptions 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. |
DeleteTable(TableReference, DeleteTableOptions)
public virtual void DeleteTable(TableReference tableReference, DeleteTableOptions options = null)
Deletes the specified table.
Parameters | |
---|---|
Name | Description |
tableReference | Google.Apis.Bigquery.v2.Data.TableReference A fully-qualified identifier for the table. Must not be null. |
options | DeleteTableOptions The options for the operation. May be null, in which case defaults will be supplied. |
See DeleteTable for an example using an alternative overload.
DeleteTable(String, String, DeleteTableOptions)
public virtual void DeleteTable(string datasetId, string tableId, DeleteTableOptions options = null)
Deletes the specified table within this client's project. This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to DeleteTable(TableReference, DeleteTableOptions).
Parameters | |
---|---|
Name | Description |
datasetId | String The dataset ID. Must not be null. |
tableId | String The table ID. Must not be null. |
options | DeleteTableOptions The options for the operation. May be null, in which case defaults will be supplied. |
BigQueryClient client = BigQueryClient.Create(projectId);
client.DeleteTable(datasetId, tableId);
DeleteTable(String, String, String, DeleteTableOptions)
public virtual void DeleteTable(string projectId, string datasetId, string tableId, DeleteTableOptions options = null)
Deletes the specified table. This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to DeleteTable(TableReference, DeleteTableOptions).
Parameters | |
---|---|
Name | Description |
projectId | String The project ID. Must not be null. |
datasetId | String The dataset ID. Must not be null. |
tableId | String The table ID. Must not be null. |
options | DeleteTableOptions The options for the operation. May be null, in which case defaults will be supplied. |
See DeleteTable for an example using an alternative overload.
DeleteTableAsync(TableReference, DeleteTableOptions, CancellationToken)
public virtual Task DeleteTableAsync(TableReference tableReference, DeleteTableOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously deletes the specified table.
Parameters | |
---|---|
Name | Description |
tableReference | Google.Apis.Bigquery.v2.Data.TableReference A fully-qualified identifier for the table. Must not be null. |
options | DeleteTableOptions 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. |
See DeleteTableAsync for an example using an alternative overload.
DeleteTableAsync(String, String, DeleteTableOptions, CancellationToken)
public virtual Task DeleteTableAsync(string datasetId, string tableId, DeleteTableOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously deletes the specified table within this client's project. This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to DeleteTableAsync(TableReference, DeleteTableOptions, CancellationToken).
Parameters | |
---|---|
Name | Description |
datasetId | String The dataset ID. Must not be null. |
tableId | String The table ID. Must not be null. |
options | DeleteTableOptions 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. |
BigQueryClient client = await BigQueryClient.CreateAsync(projectId);
await client.DeleteTableAsync(datasetId, tableId);
DeleteTableAsync(String, String, String, DeleteTableOptions, CancellationToken)
public virtual Task DeleteTableAsync(string projectId, string datasetId, string tableId, DeleteTableOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously deletes the specified table. This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to DeleteTableAsync(TableReference, DeleteTableOptions, CancellationToken).
Parameters | |
---|---|
Name | Description |
projectId | String The project ID. Must not be null. |
datasetId | String The dataset ID. Must not be null. |
tableId | String The table ID. Must not be null. |
options | DeleteTableOptions 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. |
See DeleteTableAsync for an example using an alternative overload.
Dispose()
public virtual void Dispose()
Dispose of this instance. See the BigQueryClient remarks on when this should be called.
ExecuteQuery(String, IEnumerable<BigQueryParameter>, QueryOptions, GetQueryResultsOptions)
public virtual BigQueryResults ExecuteQuery(string sql, IEnumerable<BigQueryParameter> parameters, QueryOptions queryOptions = null, GetQueryResultsOptions resultsOptions = null)
Executes a query.
Parameters | |
---|---|
Name | Description |
sql | String The SQL query. Must not be null. |
parameters | IEnumerable<BigQueryParameter> The parameters for the query. May be null, which is equivalent to specifying an empty list of parameters. Must not contain null elements. |
queryOptions | QueryOptions The options for the query. May be null, in which case defaults will be supplied. |
resultsOptions | GetQueryResultsOptions The options for retrieving query results. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
BigQueryResults | The result of the query. |
This method will only return when the query has completed. It simply delegates to CreateQueryJob(String, IEnumerable<BigQueryParameter>, QueryOptions) and then GetQueryResults(GetQueryResultsOptions).
BigQueryClient client = BigQueryClient.Create(projectId);
BigQueryTable table = client.GetTable(datasetId, historyTableId);
BigQueryResults result = client.ExecuteQuery(
$@"SELECT player, MAX(score) AS score
FROM {table}
GROUP BY player
ORDER BY score DESC",
parameters: null);
foreach (BigQueryRow row in result)
{
Console.WriteLine($"{row["player"]}: {row["score"]}");
}
ExecuteQueryAsync(String, IEnumerable<BigQueryParameter>, QueryOptions, GetQueryResultsOptions, CancellationToken)
public virtual async Task<BigQueryResults> ExecuteQueryAsync(string sql, IEnumerable<BigQueryParameter> parameters, QueryOptions queryOptions = null, GetQueryResultsOptions resultsOptions = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously executes a query.
Parameters | |
---|---|
Name | Description |
sql | String The SQL query. Must not be null. |
parameters | IEnumerable<BigQueryParameter> The parameters for the query. May be null, which is equivalent to specifying an empty list of parameters. Must not contain null elements. |
queryOptions | QueryOptions The options for the query. May be null, in which case defaults will be supplied. |
resultsOptions | GetQueryResultsOptions The options for retrieving query results. May be null, in which case defaults will be supplied. |
cancellationToken | CancellationToken The token to monitor for cancellation requests. |
Returns | |
---|---|
Type | Description |
Task<BigQueryResults> | A task representing the asynchronous operation. When complete, the result is the BigQueryResults representing the query. |
The task returned by this method will only complete when the query has completed. This method simply delegates to CreateQueryJobAsync(String, IEnumerable<BigQueryParameter>, QueryOptions, CancellationToken) and then GetQueryResultsAsync(GetQueryResultsOptions, CancellationToken).
BigQueryClient client = await BigQueryClient.CreateAsync(projectId);
BigQueryTable table = await client.GetTableAsync(datasetId, historyTableId);
BigQueryResults result = await client.ExecuteQueryAsync(
$@"SELECT player, MAX(score) AS score
FROM {table}
GROUP BY player
ORDER BY score DESC",
parameters: null);
await result.GetRowsAsync().ForEachAsync(row =>
{
Console.WriteLine($"{row["player"]}: {row["score"]}");
});
GetBigQueryServiceAccountEmail(ProjectReference, GetBigQueryServiceAccountEmailOptions)
public virtual string GetBigQueryServiceAccountEmail(ProjectReference projectReference, GetBigQueryServiceAccountEmailOptions options = null)
Retrieves the service account email address that Google Cloud BigQuery uses for operations on other services such as the Google Cloud Key Management Service.
Parameters | |
---|---|
Name | Description |
projectReference | Google.Apis.Bigquery.v2.Data.ProjectReference A fully-qualified identifier for the project. Must not be null. |
options | GetBigQueryServiceAccountEmailOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
String | The email address of the service account. |
See GetBigQueryServiceAccountEmail for an example using an alternative overload.
GetBigQueryServiceAccountEmail(GetBigQueryServiceAccountEmailOptions)
public virtual string GetBigQueryServiceAccountEmail(GetBigQueryServiceAccountEmailOptions options = null)
Retrieves the service account email address that Google Cloud BigQuery uses for operations on other services such as the Google Cloud Key Management Service. This method just creates a Google.Apis.Bigquery.v2.Data.ProjectReference and delegates to GetBigQueryServiceAccountEmail(ProjectReference, GetBigQueryServiceAccountEmailOptions).
Parameter | |
---|---|
Name | Description |
options | GetBigQueryServiceAccountEmailOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
String | The email address of the service account. |
BigQueryClient client = BigQueryClient.Create(projectId);
string email = client.GetBigQueryServiceAccountEmail();
Console.WriteLine(email);
GetBigQueryServiceAccountEmail(String, GetBigQueryServiceAccountEmailOptions)
public virtual string GetBigQueryServiceAccountEmail(string projectId, GetBigQueryServiceAccountEmailOptions options = null)
Retrieves the service account email address that Google Cloud BigQuery uses for operations on other services such as the Google Cloud Key Management Service. This method just creates a Google.Apis.Bigquery.v2.Data.ProjectReference and delegates to GetBigQueryServiceAccountEmail(ProjectReference, GetBigQueryServiceAccountEmailOptions).
Parameters | |
---|---|
Name | Description |
projectId | String The project ID. Must not be null. |
options | GetBigQueryServiceAccountEmailOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
String | The email address of the service account. |
See GetBigQueryServiceAccountEmail for an example using an alternative overload.
GetBigQueryServiceAccountEmailAsync(ProjectReference, GetBigQueryServiceAccountEmailOptions, CancellationToken)
public virtual Task<string> GetBigQueryServiceAccountEmailAsync(ProjectReference projectReference, GetBigQueryServiceAccountEmailOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously retrieves the service account email address that Google Cloud BigQuery uses for operations on other services such as the Google Cloud Key Management Service.
Parameters | |
---|---|
Name | Description |
projectReference | Google.Apis.Bigquery.v2.Data.ProjectReference A fully-qualified identifier for the project. Must not be null. |
options | GetBigQueryServiceAccountEmailOptions 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<String> | A task representing the asynchronous operation. When complete, the result is the email address of the service account. |
See GetBigQueryServiceAccountEmail for a synchronous example.
GetBigQueryServiceAccountEmailAsync(GetBigQueryServiceAccountEmailOptions, CancellationToken)
public virtual Task<string> GetBigQueryServiceAccountEmailAsync(GetBigQueryServiceAccountEmailOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously retrieves the service account email address that Google Cloud BigQuery uses for operations on other services such as the Google Cloud Key Management Service. This method just creates a Google.Apis.Bigquery.v2.Data.ProjectReference and delegates to GetBigQueryServiceAccountEmailAsync(ProjectReference, GetBigQueryServiceAccountEmailOptions, CancellationToken).
Parameters | |
---|---|
Name | Description |
options | GetBigQueryServiceAccountEmailOptions 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<String> | A task representing the asynchronous operation. When complete, the result is the email address of the service account. |
See GetBigQueryServiceAccountEmail for a synchronous example.
GetBigQueryServiceAccountEmailAsync(String, GetBigQueryServiceAccountEmailOptions, CancellationToken)
public virtual Task<string> GetBigQueryServiceAccountEmailAsync(string projectId, GetBigQueryServiceAccountEmailOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously retrieves the service account email address that Google Cloud BigQuery uses for operations on other services such as the Google Cloud Key Management Service. This method just creates a Google.Apis.Bigquery.v2.Data.ProjectReference and delegates to GetBigQueryServiceAccountEmailAsync(ProjectReference, GetBigQueryServiceAccountEmailOptions, CancellationToken).
Parameters | |
---|---|
Name | Description |
projectId | String The project ID. Must not be null. |
options | GetBigQueryServiceAccountEmailOptions 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<String> | A task representing the asynchronous operation. When complete, the result is the email address of the service account. |
See GetBigQueryServiceAccountEmail for a synchronous example.
GetDataset(DatasetReference, GetDatasetOptions)
public virtual BigQueryDataset GetDataset(DatasetReference datasetReference, GetDatasetOptions options = null)
Retrieves the specified dataset.
Parameters | |
---|---|
Name | Description |
datasetReference | Google.Apis.Bigquery.v2.Data.DatasetReference A fully-qualified identifier for the dataset. Must not be null. |
options | GetDatasetOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
BigQueryDataset | The requested dataset. |
See GetDataset for an example using an alternative overload.
GetDataset(String, GetDatasetOptions)
public virtual BigQueryDataset GetDataset(string datasetId, GetDatasetOptions options = null)
Retrieves the specified dataset within this client's project. This method just creates a Google.Apis.Bigquery.v2.Data.DatasetReference and delegates to GetDataset(DatasetReference, GetDatasetOptions).
Parameters | |
---|---|
Name | Description |
datasetId | String The dataset ID. Must not be null. |
options | GetDatasetOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
BigQueryDataset | The requested dataset. |
BigQueryClient client = BigQueryClient.Create(projectId);
BigQueryDataset dataset = client.GetDataset(datasetId);
Console.WriteLine(dataset.FullyQualifiedId);
GetDataset(String, String, GetDatasetOptions)
public virtual BigQueryDataset GetDataset(string projectId, string datasetId, GetDatasetOptions options = null)
Retrieves the specified dataset. This method just creates a Google.Apis.Bigquery.v2.Data.DatasetReference and delegates to GetDataset(DatasetReference, GetDatasetOptions).
Parameters | |
---|---|
Name | Description |
projectId | String The project ID. Must not be null. |
datasetId | String The dataset ID. Must not be null. |
options | GetDatasetOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
BigQueryDataset | The requested dataset. |
See GetDataset for an example using an alternative overload.
GetDatasetAsync(DatasetReference, GetDatasetOptions, CancellationToken)
public virtual Task<BigQueryDataset> GetDatasetAsync(DatasetReference datasetReference, GetDatasetOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously retrieves the specified dataset.
Parameters | |
---|---|
Name | Description |
datasetReference | Google.Apis.Bigquery.v2.Data.DatasetReference A fully-qualified identifier for the dataset. Must not be null. |
options | GetDatasetOptions 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<BigQueryDataset> | A task representing the asynchronous operation. When complete, the result is the requested dataset. |
See GetDataset for a synchronous example.
GetDatasetAsync(String, GetDatasetOptions, CancellationToken)
public virtual Task<BigQueryDataset> GetDatasetAsync(string datasetId, GetDatasetOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously retrieves the specified dataset within this client's project. This method just creates a Google.Apis.Bigquery.v2.Data.DatasetReference and delegates to GetDatasetAsync(DatasetReference, GetDatasetOptions, CancellationToken).
Parameters | |
---|---|
Name | Description |
datasetId | String The dataset ID. Must not be null. |
options | GetDatasetOptions 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<BigQueryDataset> | A task representing the asynchronous operation. When complete, the result is the requested dataset. |
See GetDataset for a synchronous example.
GetDatasetAsync(String, String, GetDatasetOptions, CancellationToken)
public virtual Task<BigQueryDataset> GetDatasetAsync(string projectId, string datasetId, GetDatasetOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously retrieves the specified dataset. This method just creates a Google.Apis.Bigquery.v2.Data.DatasetReference and delegates to GetDatasetAsync(DatasetReference, GetDatasetOptions, CancellationToken).
Parameters | |
---|---|
Name | Description |
projectId | String The project ID. Must not be null. |
datasetId | String The dataset ID. Must not be null. |
options | GetDatasetOptions 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<BigQueryDataset> | A task representing the asynchronous operation. When complete, the result is the requested dataset. |
See GetDataset for a synchronous example.
GetDatasetReference(String)
public DatasetReference GetDatasetReference(string datasetId)
Creates a Google.Apis.Bigquery.v2.Data.DatasetReference from the given dataset ID, using this client's project ID.
Parameter | |
---|---|
Name | Description |
datasetId | String The dataset ID. Must not be null. |
Returns | |
---|---|
Type | Description |
Google.Apis.Bigquery.v2.Data.DatasetReference | A Google.Apis.Bigquery.v2.Data.DatasetReference representing the requested dataset. |
BigQueryClient client = BigQueryClient.Create(projectId);
DatasetReference reference = client.GetDatasetReference("dataset");
// ProjectId is defaulted from the client in this overload
Console.WriteLine(reference.ProjectId);
GetDatasetReference(String, String)
public DatasetReference GetDatasetReference(string projectId, string datasetId)
Creates a Google.Apis.Bigquery.v2.Data.DatasetReference from the given project ID and dataset ID.
Parameters | |
---|---|
Name | Description |
projectId | String The project ID. Must not be null. |
datasetId | String The dataset ID. Must not be null. |
Returns | |
---|---|
Type | Description |
Google.Apis.Bigquery.v2.Data.DatasetReference | A Google.Apis.Bigquery.v2.Data.DatasetReference representing the requested dataset. |
BigQueryClient client = BigQueryClient.Create(projectId);
DatasetReference reference = client.GetDatasetReference("other-project", "dataset");
// ProjectId is as specified in the call, not the client's project
Console.WriteLine(reference.ProjectId);
GetJob(JobReference, GetJobOptions)
public virtual BigQueryJob GetJob(JobReference jobReference, GetJobOptions options = null)
Retrieves the specified job.
Parameters | |
---|---|
Name | Description |
jobReference | Google.Apis.Bigquery.v2.Data.JobReference A fully-qualified identifier for the job. Must not be null. |
options | GetJobOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
BigQueryJob | The retrieved job. |
See GetJob for an example using an alternative overload.
GetJob(String, GetJobOptions)
public virtual BigQueryJob GetJob(string jobId, GetJobOptions options = null)
Retrieves the specified job within this client's project. This method just creates a Google.Apis.Bigquery.v2.Data.JobReference and delegates to GetJob(JobReference, GetJobOptions).
Parameters | |
---|---|
Name | Description |
jobId | String The job ID. Must not be null. |
options | GetJobOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
BigQueryJob | The retrieved job. |
BigQueryClient client = BigQueryClient.Create(projectId);
BigQueryJob job = client.GetJob(jobId);
Console.WriteLine(job.State);
GetJob(String, String, GetJobOptions)
public virtual BigQueryJob GetJob(string projectId, string jobId, GetJobOptions options = null)
Retrieves the specified job. This method just creates a Google.Apis.Bigquery.v2.Data.JobReference and delegates to GetJob(JobReference, GetJobOptions).
Parameters | |
---|---|
Name | Description |
projectId | String The project ID. Must not be null. |
jobId | String The job ID. Must not be null. |
options | GetJobOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
BigQueryJob | The retrieved job. |
See GetJob for an example using an alternative overload.
GetJobAsync(JobReference, GetJobOptions, CancellationToken)
public virtual Task<BigQueryJob> GetJobAsync(JobReference jobReference, GetJobOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously retrieves the specified job.
Parameters | |
---|---|
Name | Description |
jobReference | Google.Apis.Bigquery.v2.Data.JobReference A fully-qualified identifier for the job. Must not be null. |
options | GetJobOptions 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 retrieved job. |
See GetJob for a synchronous example.
GetJobAsync(String, GetJobOptions, CancellationToken)
public virtual Task<BigQueryJob> GetJobAsync(string jobId, GetJobOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously retrieves the specified job within this client's project. This method just creates a Google.Apis.Bigquery.v2.Data.JobReference and delegates to GetJobAsync(JobReference, GetJobOptions, CancellationToken).
Parameters | |
---|---|
Name | Description |
jobId | String The job ID. Must not be null. |
options | GetJobOptions 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 retrieved job. |
See GetJob for a synchronous example.
GetJobAsync(String, String, GetJobOptions, CancellationToken)
public virtual Task<BigQueryJob> GetJobAsync(string projectId, string jobId, GetJobOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously retrieves the specified job. This method just creates a Google.Apis.Bigquery.v2.Data.JobReference and delegates to GetJobAsync(JobReference, GetJobOptions, CancellationToken).
Parameters | |
---|---|
Name | Description |
projectId | String The project ID. Must not be null. |
jobId | String The job ID. Must not be null. |
options | GetJobOptions 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 retrieved job. |
See GetJob for a synchronous example.
GetJobReference(String)
public JobReference GetJobReference(string jobId)
Creates a Google.Apis.Bigquery.v2.Data.JobReference from the given job ID, using this client's project ID and default location.
Parameter | |
---|---|
Name | Description |
jobId | String The job ID. Must not be null. |
Returns | |
---|---|
Type | Description |
Google.Apis.Bigquery.v2.Data.JobReference | A Google.Apis.Bigquery.v2.Data.JobReference representing the requested job. |
BigQueryClient client = BigQueryClient.Create(projectId);
JobReference reference = client.GetJobReference("job");
// ProjectId is defaulted from the client in this overload
Console.WriteLine(reference.ProjectId);
GetJobReference(String, String)
public JobReference GetJobReference(string projectId, string jobId)
Creates a Google.Apis.Bigquery.v2.Data.JobReference from the given project ID and job ID, using this client's default location.
Parameters | |
---|---|
Name | Description |
projectId | String The project ID. Must not be null. |
jobId | String The job ID. Must not be null. |
Returns | |
---|---|
Type | Description |
Google.Apis.Bigquery.v2.Data.JobReference | A Google.Apis.Bigquery.v2.Data.JobReference representing the requested job. |
BigQueryClient client = BigQueryClient.Create(projectId);
JobReference reference = client.GetJobReference("other-project", "job");
// ProjectId is as specified in the call, not the client's project
Console.WriteLine(reference.ProjectId);
GetJobReference(String, String, String)
public JobReference GetJobReference(string projectId, string jobId, string location)
Creates a Google.Apis.Bigquery.v2.Data.JobReference from the given project ID, job ID and location.
Parameters | |
---|---|
Name | Description |
projectId | String The project ID. Must not be null. |
jobId | String The job ID. Must not be null. |
location | String The location. May be null. |
Returns | |
---|---|
Type | Description |
Google.Apis.Bigquery.v2.Data.JobReference | A Google.Apis.Bigquery.v2.Data.JobReference representing the requested job. |
GetModel(ModelReference, GetModelOptions)
public virtual BigQueryModel GetModel(ModelReference modelReference, GetModelOptions options = null)
Retrieves the specified model.
Parameters | |
---|---|
Name | Description |
modelReference | Google.Apis.Bigquery.v2.Data.ModelReference A fully-qualified identifier for the model. Must not be null. |
options | GetModelOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
BigQueryModel | The requested model. |
GetModel(String, String, GetModelOptions)
public virtual BigQueryModel GetModel(string datasetId, string modelId, GetModelOptions options = null)
Retrieves the specified model within this client's project. This method just creates a Google.Apis.Bigquery.v2.Data.ModelReference and delegates to GetModel(ModelReference, GetModelOptions).
Parameters | |
---|---|
Name | Description |
datasetId | String The dataset ID. Must not be null. |
modelId | String The model ID. Must not be null. |
options | GetModelOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
BigQueryModel | The requested model. |
GetModel(String, String, String, GetModelOptions)
public virtual BigQueryModel GetModel(string projectId, string datasetId, string modelId, GetModelOptions options = null)
Retrieves the specified model. This method just creates a Google.Apis.Bigquery.v2.Data.ModelReference and delegates to GetModel(ModelReference, GetModelOptions).
Parameters | |
---|---|
Name | Description |
projectId | String The project ID. Must not be null. |
datasetId | String The dataset ID. Must not be null. |
modelId | String The model ID. Must not be null. |
options | GetModelOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
BigQueryModel | The requested model. |
GetModelAsync(ModelReference, GetModelOptions, CancellationToken)
public virtual Task<BigQueryModel> GetModelAsync(ModelReference modelReference, GetModelOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously retrieves the specified model.
Parameters | |
---|---|
Name | Description |
modelReference | Google.Apis.Bigquery.v2.Data.ModelReference A fully-qualified identifier for the model. Must not be null. |
options | GetModelOptions 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 requested model. |
GetModelAsync(String, String, GetModelOptions, CancellationToken)
public virtual Task<BigQueryModel> GetModelAsync(string datasetId, string modelId, GetModelOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously retrieves the specified model within this client's project. This method just creates a Google.Apis.Bigquery.v2.Data.ModelReference and delegates to GetModelAsync(ModelReference, GetModelOptions, CancellationToken).
Parameters | |
---|---|
Name | Description |
datasetId | String The dataset ID. Must not be null. |
modelId | String The model ID. Must not be null. |
options | GetModelOptions 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 requested model. |
GetModelAsync(String, String, String, GetModelOptions, CancellationToken)
public virtual Task<BigQueryModel> GetModelAsync(string projectId, string datasetId, string modelId, GetModelOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously retrieves the specified model. This method just creates a Google.Apis.Bigquery.v2.Data.ModelReference and delegates to GetModelAsync(ModelReference, GetModelOptions, CancellationToken).
Parameters | |
---|---|
Name | Description |
projectId | String The project ID. Must not be null. |
datasetId | String The dataset ID. Must not be null. |
modelId | String The model ID. Must not be null. |
options | GetModelOptions 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 requested model. |
GetModelReference(String, String)
public ModelReference GetModelReference(string datasetId, string modelId)
Creates a Google.Apis.Bigquery.v2.Data.ModelReference from the given dataset ID and model ID, using this client's project ID.
Parameters | |
---|---|
Name | Description |
datasetId | String The dataset ID. Must not be null. |
modelId | String The model ID. Must not be null. |
Returns | |
---|---|
Type | Description |
Google.Apis.Bigquery.v2.Data.ModelReference | A Google.Apis.Bigquery.v2.Data.ModelReference representing the requested model. |
GetModelReference(String, String, String)
public ModelReference GetModelReference(string projectId, string datasetId, string modelId)
Creates a Google.Apis.Bigquery.v2.Data.ModelReference from the given project ID, dataset ID and model ID.
Parameters | |
---|---|
Name | Description |
projectId | String The project ID. Must not be null. |
datasetId | String The dataset ID. Must not be null. |
modelId | String The model ID. Must not be null. |
Returns | |
---|---|
Type | Description |
Google.Apis.Bigquery.v2.Data.ModelReference | A Google.Apis.Bigquery.v2.Data.ModelReference representing the requested model. |
GetOrCreateDataset(DatasetReference, Dataset, GetDatasetOptions, CreateDatasetOptions)
public virtual BigQueryDataset GetOrCreateDataset(DatasetReference datasetReference, Dataset resource = null, GetDatasetOptions getOptions = null, CreateDatasetOptions createOptions = null)
Attempts to fetch the specified dataset, creating it if it doesn't exist.
Parameters | |
---|---|
Name | Description |
datasetReference | Google.Apis.Bigquery.v2.Data.DatasetReference A fully-qualified identifier for the dataset. Must not be null. |
resource | Google.Apis.Bigquery.v2.Data.Dataset The dataset resource representation to use for the creation. May be null in which case default values will be used. |
getOptions | GetDatasetOptions The options for the "get" operation. May be null, in which case defaults will be supplied. |
createOptions | CreateDatasetOptions The options for the "create" operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
BigQueryDataset | The existing or new dataset. |
If resource
Google.Apis.Bigquery.v2.Data.Dataset.DatasetReference is specified, then it must be the same as the Google.Apis.Bigquery.v2.Data.DatasetReference obtained from the other parameters.
See GetOrCreateDataset for an example using an alternative overload.
GetOrCreateDataset(String, Dataset, GetDatasetOptions, CreateDatasetOptions)
public virtual BigQueryDataset GetOrCreateDataset(string datasetId, Dataset resource = null, GetDatasetOptions getOptions = null, CreateDatasetOptions createOptions = null)
Attempts to fetch the specified dataset within this client's project, creating it if it doesn't exist. This method just creates a Google.Apis.Bigquery.v2.Data.DatasetReference and delegates to GetOrCreateDataset(DatasetReference, Dataset, GetDatasetOptions, CreateDatasetOptions).
Parameters | |
---|---|
Name | Description |
datasetId | String The dataset ID. Must not be null. |
resource | Google.Apis.Bigquery.v2.Data.Dataset The dataset resource representation to use for the creation. May be null in which case default values will be used. |
getOptions | GetDatasetOptions The options for the "get" operation. May be null, in which case defaults will be supplied. |
createOptions | CreateDatasetOptions The options for the "create" operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
BigQueryDataset | The existing or new dataset. |
If resource
Google.Apis.Bigquery.v2.Data.Dataset.DatasetReference is specified, then it must be the same as the Google.Apis.Bigquery.v2.Data.DatasetReference obtained from the other parameters.
BigQueryClient client = BigQueryClient.Create(projectId);
// If the dataset isn't found, it will be created.
BigQueryDataset dataset = client.GetOrCreateDataset(datasetId);
// Now populate tables in the dataset...
GetOrCreateDataset(String, String, Dataset, GetDatasetOptions, CreateDatasetOptions)
public virtual BigQueryDataset GetOrCreateDataset(string projectId, string datasetId, Dataset resource = null, GetDatasetOptions getOptions = null, CreateDatasetOptions createOptions = null)
Attempts to fetch the specified dataset, creating it if it doesn't exist. This method just creates a Google.Apis.Bigquery.v2.Data.DatasetReference and delegates to GetOrCreateDataset(DatasetReference, Dataset, GetDatasetOptions, CreateDatasetOptions).
Parameters | |
---|---|
Name | Description |
projectId | String The project ID. Must not be null. |
datasetId | String The dataset ID. Must not be null. |
resource | Google.Apis.Bigquery.v2.Data.Dataset The dataset resource representation to use for the creation. May be null in which case default values will be used. |
getOptions | GetDatasetOptions The options for the "get" operation. May be null, in which case defaults will be supplied. |
createOptions | CreateDatasetOptions The options for the "create" operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
BigQueryDataset | The existing or new dataset. |
If resource
Google.Apis.Bigquery.v2.Data.Dataset.DatasetReference is specified, then it must be the same as the Google.Apis.Bigquery.v2.Data.DatasetReference obtained from the other parameters.
See GetOrCreateDataset for an example using an alternative overload.
GetOrCreateDatasetAsync(DatasetReference, Dataset, GetDatasetOptions, CreateDatasetOptions, CancellationToken)
public virtual Task<BigQueryDataset> GetOrCreateDatasetAsync(DatasetReference datasetReference, Dataset resource = null, GetDatasetOptions getOptions = null, CreateDatasetOptions createOptions = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously attempts to fetch the specified dataset, creating it if it doesn't exist.
Parameters | |
---|---|
Name | Description |
datasetReference | Google.Apis.Bigquery.v2.Data.DatasetReference A fully-qualified identifier for the dataset. Must not be null. |
resource | Google.Apis.Bigquery.v2.Data.Dataset The dataset resource representation to use for the creation. May be null in which case default values will be used. |
getOptions | GetDatasetOptions The options for the "get" operation. May be null, in which case defaults will be supplied. |
createOptions | CreateDatasetOptions The options for the "create" operation. May be null, in which case defaults will be supplied. |
cancellationToken | CancellationToken The token to monitor for cancellation requests. |
Returns | |
---|---|
Type | Description |
Task<BigQueryDataset> | A task representing the asynchronous operation. When complete, the result is the existing or new dataset. |
If resource
Google.Apis.Bigquery.v2.Data.Dataset.DatasetReference is specified, then it must be the same as the Google.Apis.Bigquery.v2.Data.DatasetReference obtained from the other parameters.
See GetOrCreateDataset for an example using an alternative overload.
GetOrCreateDatasetAsync(String, Dataset, GetDatasetOptions, CreateDatasetOptions, CancellationToken)
public virtual Task<BigQueryDataset> GetOrCreateDatasetAsync(string datasetId, Dataset resource = null, GetDatasetOptions getOptions = null, CreateDatasetOptions createOptions = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously attempts to fetch the specified dataset within this client's project, creating it if it doesn't exist. This method just creates a Google.Apis.Bigquery.v2.Data.DatasetReference and delegates to GetOrCreateDatasetAsync(DatasetReference, Dataset, GetDatasetOptions, CreateDatasetOptions, CancellationToken).
Parameters | |
---|---|
Name | Description |
datasetId | String The dataset ID. Must not be null. |
resource | Google.Apis.Bigquery.v2.Data.Dataset The dataset resource representation to use for the creation. May be null in which case default values will be used. |
getOptions | GetDatasetOptions The options for the "get" operation. May be null, in which case defaults will be supplied. |
createOptions | CreateDatasetOptions The options for the "create" operation. May be null, in which case defaults will be supplied. |
cancellationToken | CancellationToken The token to monitor for cancellation requests. |
Returns | |
---|---|
Type | Description |
Task<BigQueryDataset> | A task representing the asynchronous operation. When complete, the result is the existing or new dataset. |
If resource
Google.Apis.Bigquery.v2.Data.Dataset.DatasetReference is specified, then it must be the same as the Google.Apis.Bigquery.v2.Data.DatasetReference obtained from the other parameters.
BigQueryClient client = await BigQueryClient.CreateAsync(projectId);
// If the dataset isn't found, it will be created.
BigQueryDataset dataset = await client.GetOrCreateDatasetAsync(datasetId);
// Now populate tables in the dataset...
GetOrCreateDatasetAsync(String, String, Dataset, GetDatasetOptions, CreateDatasetOptions, CancellationToken)
public virtual Task<BigQueryDataset> GetOrCreateDatasetAsync(string projectId, string datasetId, Dataset resource = null, GetDatasetOptions getOptions = null, CreateDatasetOptions createOptions = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously attempts to fetch the specified dataset, creating it if it doesn't exist. This method just creates a Google.Apis.Bigquery.v2.Data.DatasetReference and delegates to GetOrCreateDatasetAsync(DatasetReference, Dataset, GetDatasetOptions, CreateDatasetOptions, CancellationToken).
Parameters | |
---|---|
Name | Description |
projectId | String The project ID. Must not be null. |
datasetId | String The dataset ID. Must not be null. |
resource | Google.Apis.Bigquery.v2.Data.Dataset The dataset resource representation to use for the creation. May be null in which case default values will be used. |
getOptions | GetDatasetOptions The options for the "get" operation. May be null, in which case defaults will be supplied. |
createOptions | CreateDatasetOptions The options for the "create" operation. May be null, in which case defaults will be supplied. |
cancellationToken | CancellationToken The token to monitor for cancellation requests. |
Returns | |
---|---|
Type | Description |
Task<BigQueryDataset> | A task representing the asynchronous operation. When complete, the result is the existing or new dataset. |
If resource
Google.Apis.Bigquery.v2.Data.Dataset.DatasetReference is specified, then it must be the same as the Google.Apis.Bigquery.v2.Data.DatasetReference obtained from the other parameters.
See GetOrCreateDataset for an example using an alternative overload.
GetOrCreateRoutine(RoutineReference, Routine, GetRoutineOptions, CreateRoutineOptions)
public virtual BigQueryRoutine GetOrCreateRoutine(RoutineReference routineReference, Routine resource, GetRoutineOptions getOptions = null, CreateRoutineOptions createOptions = null)
Attempts to fetch the specified routine, creating it if it doesn't exist.
Parameters | |
---|---|
Name | Description |
routineReference | Google.Apis.Bigquery.v2.Data.RoutineReference A fully-qualified identifier for the routine. Must not be null. |
resource | Google.Apis.Bigquery.v2.Data.Routine The routine resource representation to use for the creation. Must not be null. If this routine's Google.Apis.Bigquery.v2.Data.Routine.RoutineReference is specified, then it must be the same as the one obtained from the other parameters, else it will be set to the one obtained from the other parameters. |
getOptions | GetRoutineOptions The options for the "get" operation. May be null, in which case defaults will be supplied. |
createOptions | CreateRoutineOptions The options for the "create" operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
BigQueryRoutine | The existing or new routine. |
GetOrCreateRoutine(String, String, Routine, GetRoutineOptions, CreateRoutineOptions)
public virtual BigQueryRoutine GetOrCreateRoutine(string datasetId, string routineId, Routine resource, GetRoutineOptions getOptions = null, CreateRoutineOptions createOptions = null)
Attempts to fetch the specified routine within this client's project, creating it if it doesn't exist. This method just creates a Google.Apis.Bigquery.v2.Data.RoutineReference and delegates to GetOrCreateRoutine(RoutineReference, Routine, GetRoutineOptions, CreateRoutineOptions).
Parameters | |
---|---|
Name | Description |
datasetId | String The dataset ID. Must not be null. |
routineId | String The routine ID. Must not be null. |
resource | Google.Apis.Bigquery.v2.Data.Routine The routine resource representation to use for the creation. Must not be null. If this routine's Google.Apis.Bigquery.v2.Data.Routine.RoutineReference is specified, then it must be the same as the one obtained from the other parameters, else it will be set to the one obtained from the other parameters. |
getOptions | GetRoutineOptions The options for the "get" operation. May be null, in which case defaults will be supplied. |
createOptions | CreateRoutineOptions The options for the "create" operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
BigQueryRoutine | The existing or new routine. |
GetOrCreateRoutine(String, String, String, Routine, GetRoutineOptions, CreateRoutineOptions)
public virtual BigQueryRoutine GetOrCreateRoutine(string projectId, string datasetId, string routineId, Routine resource, GetRoutineOptions getOptions = null, CreateRoutineOptions createOptions = null)
Attempts to fetch the specified routine, creating it if it doesn't exist. This method just creates a Google.Apis.Bigquery.v2.Data.RoutineReference and delegates to GetOrCreateRoutine(RoutineReference, Routine, GetRoutineOptions, CreateRoutineOptions).
Parameters | |
---|---|
Name | Description |
projectId | String The project ID. Must not be null. |
datasetId | String The dataset ID. Must not be null. |
routineId | String The routine ID. Must not be null. |
resource | Google.Apis.Bigquery.v2.Data.Routine The routine resource representation to use for the creation. Must not be null. If this routine's Google.Apis.Bigquery.v2.Data.Routine.RoutineReference is specified, then it must be the same as the one obtained from the other parameters, else it will be set to the one obtained from the other parameters. |
getOptions | GetRoutineOptions The options for the "get" operation. May be null, in which case defaults will be supplied. |
createOptions | CreateRoutineOptions The options for the "create" operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
BigQueryRoutine | The existing or new routine. |
GetOrCreateRoutineAsync(RoutineReference, Routine, GetRoutineOptions, CreateRoutineOptions, CancellationToken)
public virtual Task<BigQueryRoutine> GetOrCreateRoutineAsync(RoutineReference routineReference, Routine resource, GetRoutineOptions getOptions = null, CreateRoutineOptions createOptions = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously attempts to fetch the specified routine, creating it if it doesn't exist.
Parameters | |
---|---|
Name | Description |
routineReference | Google.Apis.Bigquery.v2.Data.RoutineReference A fully-qualified identifier for the routine. Must not be null. |
resource | Google.Apis.Bigquery.v2.Data.Routine The routine resource representation to use for the creation. Must not be null. If this routine's Google.Apis.Bigquery.v2.Data.Routine.RoutineReference is specified, then it must be the same as the one obtained from the other parameters, else it will be set to the one obtained from the other parameters. |
getOptions | GetRoutineOptions The options for the "get" operation. May be null, in which case defaults will be supplied. |
createOptions | CreateRoutineOptions The options for the "create" operation. May be null, in which case defaults will be supplied. |
cancellationToken | CancellationToken The token to monitor for cancellation requests. |
Returns | |
---|---|
Type | Description |
Task<BigQueryRoutine> | A task representing the asynchronous operation. When complete, the result is the existing or new routine. |
GetOrCreateRoutineAsync(String, String, Routine, GetRoutineOptions, CreateRoutineOptions, CancellationToken)
public virtual Task<BigQueryRoutine> GetOrCreateRoutineAsync(string datasetId, string routineId, Routine resource, GetRoutineOptions getOptions = null, CreateRoutineOptions createOptions = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously attempts to fetch the specified routine within this client's project, creating it if it doesn't exist. This method just creates a Google.Apis.Bigquery.v2.Data.RoutineReference and delegates to GetOrCreateRoutineAsync(RoutineReference, Routine, GetRoutineOptions, CreateRoutineOptions, CancellationToken).
Parameters | |
---|---|
Name | Description |
datasetId | String The dataset ID. Must not be null. |
routineId | String The routine ID. Must not be null. |
resource | Google.Apis.Bigquery.v2.Data.Routine The routine resource representation to use for the creation. Must not be null. If this routine's Google.Apis.Bigquery.v2.Data.Routine.RoutineReference is specified, then it must be the same as the one obtained from the other parameters, else it will be set to the one obtained from the other parameters. |
getOptions | GetRoutineOptions The options for the "get" operation. May be null, in which case defaults will be supplied. |
createOptions | CreateRoutineOptions The options for the "create" operation. May be null, in which case defaults will be supplied. |
cancellationToken | CancellationToken The token to monitor for cancellation requests. |
Returns | |
---|---|
Type | Description |
Task<BigQueryRoutine> | A task representing the asynchronous operation. When complete, the result is the existing or new routine. |
GetOrCreateRoutineAsync(String, String, String, Routine, GetRoutineOptions, CreateRoutineOptions, CancellationToken)
public virtual Task<BigQueryRoutine> GetOrCreateRoutineAsync(string projectId, string datasetId, string routineId, Routine resource, GetRoutineOptions getOptions = null, CreateRoutineOptions createOptions = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously attempts to fetch the specified routine, creating it if it doesn't exist. This method just creates a Google.Apis.Bigquery.v2.Data.RoutineReference and delegates to GetOrCreateRoutineAsync(RoutineReference, Routine, GetRoutineOptions, CreateRoutineOptions, CancellationToken).
Parameters | |
---|---|
Name | Description |
projectId | String The project ID. Must not be null. |
datasetId | String The dataset ID. Must not be null. |
routineId | String The routine ID. Must not be null. |
resource | Google.Apis.Bigquery.v2.Data.Routine The routine resource representation to use for the creation. Must not be null. If this routine's Google.Apis.Bigquery.v2.Data.Routine.RoutineReference is specified, then it must be the same as the one obtained from the other parameters, else it will be set to the one obtained from the other parameters. |
getOptions | GetRoutineOptions The options for the "get" operation. May be null, in which case defaults will be supplied. |
createOptions | CreateRoutineOptions The options for the "create" operation. May be null, in which case defaults will be supplied. |
cancellationToken | CancellationToken The token to monitor for cancellation requests. |
Returns | |
---|---|
Type | Description |
Task<BigQueryRoutine> | A task representing the asynchronous operation. When complete, the result is the existing or new routine. |
GetOrCreateTable(TableReference, Table, GetTableOptions, CreateTableOptions)
public virtual BigQueryTable GetOrCreateTable(TableReference tableReference, Table resource, GetTableOptions getOptions = null, CreateTableOptions createOptions = null)
Attempts to fetch the specified table, creating it if it doesn't exist.
Parameters | |
---|---|
Name | Description |
tableReference | Google.Apis.Bigquery.v2.Data.TableReference A fully-qualified identifier for the table. Must not be null. |
resource | Google.Apis.Bigquery.v2.Data.Table The table resource representation to use for the creation. Must not be null. If this table's Google.Apis.Bigquery.v2.Data.Table.TableReference is specified, then it must be the same as the one obtained from the other parameters, else it will be set to the one obtained from the other parameters. |
getOptions | GetTableOptions The options for the "get" operation. May be null, in which case defaults will be supplied. |
createOptions | CreateTableOptions The options for the "create" operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
BigQueryTable | The existing or new table. |
GetOrCreateTable(TableReference, TableSchema, GetTableOptions, CreateTableOptions)
public virtual BigQueryTable GetOrCreateTable(TableReference tableReference, TableSchema schema, GetTableOptions getOptions = null, CreateTableOptions createOptions = null)
Attempts to fetch the specified table, creating it if it doesn't exist.
Parameters | |
---|---|
Name | Description |
tableReference | Google.Apis.Bigquery.v2.Data.TableReference A fully-qualified identifier for the table. Must not be null. |
schema | Google.Apis.Bigquery.v2.Data.TableSchema The schema for the new table. Must not be null. |
getOptions | GetTableOptions The options for the "get" operation. May be null, in which case defaults will be supplied. |
createOptions | CreateTableOptions The options for the "create" operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
BigQueryTable | The existing or new table. |
See GetOrCreateTable for an example using an alternative overload.
GetOrCreateTable(String, String, Table, GetTableOptions, CreateTableOptions)
public virtual BigQueryTable GetOrCreateTable(string datasetId, string tableId, Table resource, GetTableOptions getOptions = null, CreateTableOptions createOptions = null)
Attempts to fetch the specified table within this client's project, creating it if it doesn't exist. This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to GetOrCreateTable(TableReference, Table, GetTableOptions, CreateTableOptions).
Parameters | |
---|---|
Name | Description |
datasetId | String The dataset ID. Must not be null. |
tableId | String The table ID. Must not be null. |
resource | Google.Apis.Bigquery.v2.Data.Table The table resource representation to use for the creation. Must not be null. If this table's Google.Apis.Bigquery.v2.Data.Table.TableReference is specified, then it must be the same as the one obtained from the other parameters, else it will be set to the one obtained from the other parameters. |
getOptions | GetTableOptions The options for the "get" operation. May be null, in which case defaults will be supplied. |
createOptions | CreateTableOptions The options for the "create" operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
BigQueryTable | The existing or new table. |
See GetOrCreateTable for an example using an alternative overload.
GetOrCreateTable(String, String, TableSchema, GetTableOptions, CreateTableOptions)
public virtual BigQueryTable GetOrCreateTable(string datasetId, string tableId, TableSchema schema, GetTableOptions getOptions = null, CreateTableOptions createOptions = null)
Attempts to fetch the specified table within this client's project, creating it if it doesn't exist. This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to GetOrCreateTable(TableReference, TableSchema, GetTableOptions, CreateTableOptions).
Parameters | |
---|---|
Name | Description |
datasetId | String The dataset ID. Must not be null. |
tableId | String The table ID. Must not be null. |
schema | Google.Apis.Bigquery.v2.Data.TableSchema The schema for the new table. Must not be null. |
getOptions | GetTableOptions The options for the "get" operation. May be null, in which case defaults will be supplied. |
createOptions | CreateTableOptions The options for the "create" operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
BigQueryTable | The existing or new table. |
BigQueryClient client = BigQueryClient.Create(projectId);
TableSchema schema = new TableSchemaBuilder
{
{ "from_player", BigQueryDbType.String },
{ "to_player", BigQueryDbType.String },
{ "message", BigQueryDbType.String }
}.Build();
// If the table isn't found, it will be created.
BigQueryTable table = client.GetOrCreateTable(datasetId, tableId, schema);
// Now populate the table with data...
GetOrCreateTable(String, String, String, Table, GetTableOptions, CreateTableOptions)
public virtual BigQueryTable GetOrCreateTable(string projectId, string datasetId, string tableId, Table resource, GetTableOptions getOptions = null, CreateTableOptions createOptions = null)
Attempts to fetch the specified table, creating it if it doesn't exist. This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to GetOrCreateTable(TableReference, Table, GetTableOptions, CreateTableOptions).
Parameters | |
---|---|
Name | Description |
projectId | String The project ID. Must not be null. |
datasetId | String The dataset ID. Must not be null. |
tableId | String The table ID. Must not be null. |
resource | Google.Apis.Bigquery.v2.Data.Table The table resource representation to use for the creation. Must not be null. If this table's Google.Apis.Bigquery.v2.Data.Table.TableReference is specified, then it must be the same as the one obtained from the other parameters, else it will be set to the one obtained from the other parameters. |
getOptions | GetTableOptions The options for the "get" operation. May be null, in which case defaults will be supplied. |
createOptions | CreateTableOptions The options for the "create" operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
BigQueryTable | The existing or new table. |
GetOrCreateTable(String, String, String, TableSchema, GetTableOptions, CreateTableOptions)
public virtual BigQueryTable GetOrCreateTable(string projectId, string datasetId, string tableId, TableSchema schema, GetTableOptions getOptions = null, CreateTableOptions createOptions = null)
Attempts to fetch the specified table, creating it if it doesn't exist. This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to GetOrCreateTable(TableReference, TableSchema, GetTableOptions, CreateTableOptions).
Parameters | |
---|---|
Name | Description |
projectId | String The project ID. Must not be null. |
datasetId | String The dataset ID. Must not be null. |
tableId | String The table ID. Must not be null. |
schema | Google.Apis.Bigquery.v2.Data.TableSchema The schema for the new table. Must not be null. |
getOptions | GetTableOptions The options for the "get" operation. May be null, in which case defaults will be supplied. |
createOptions | CreateTableOptions The options for the "create" operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
BigQueryTable | The existing or new table. |
See GetOrCreateTable for an example using an alternative overload.
GetOrCreateTableAsync(TableReference, Table, GetTableOptions, CreateTableOptions, CancellationToken)
public virtual Task<BigQueryTable> GetOrCreateTableAsync(TableReference tableReference, Table resource, GetTableOptions getOptions = null, CreateTableOptions createOptions = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously attempts to fetch the specified table, creating it if it doesn't exist.
Parameters | |
---|---|
Name | Description |
tableReference | Google.Apis.Bigquery.v2.Data.TableReference A fully-qualified identifier for the table. Must not be null. |
resource | Google.Apis.Bigquery.v2.Data.Table The table resource representation to use for the creation. Must not be null. If this table's Google.Apis.Bigquery.v2.Data.Table.TableReference is specified, then it must be the same as the one obtained from the other parameters, else it will be set to the one obtained from the other parameters. |
getOptions | GetTableOptions The options for the "get" operation. May be null, in which case defaults will be supplied. |
createOptions | CreateTableOptions The options for the "create" operation. May be null, in which case defaults will be supplied. |
cancellationToken | CancellationToken The token to monitor for cancellation requests. |
Returns | |
---|---|
Type | Description |
Task<BigQueryTable> | A task representing the asynchronous operation. When complete, the result is the existing or new table. |
See GetOrCreateTableAsync for an example using an alternative overload.
GetOrCreateTableAsync(TableReference, TableSchema, GetTableOptions, CreateTableOptions, CancellationToken)
public virtual Task<BigQueryTable> GetOrCreateTableAsync(TableReference tableReference, TableSchema schema, GetTableOptions getOptions = null, CreateTableOptions createOptions = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously attempts to fetch the specified table, creating it if it doesn't exist.
Parameters | |
---|---|
Name | Description |
tableReference | Google.Apis.Bigquery.v2.Data.TableReference A fully-qualified identifier for the table. Must not be null. |
schema | Google.Apis.Bigquery.v2.Data.TableSchema The schema for the new table. Must not be null. |
getOptions | GetTableOptions The options for the "get" operation. May be null, in which case defaults will be supplied. |
createOptions | CreateTableOptions The options for the "create" operation. May be null, in which case defaults will be supplied. |
cancellationToken | CancellationToken The token to monitor for cancellation requests. |
Returns | |
---|---|
Type | Description |
Task<BigQueryTable> | A task representing the asynchronous operation. When complete, the result is the existing or new table. |
See GetOrCreateTableAsync for an example using an alternative overload.
GetOrCreateTableAsync(String, String, Table, GetTableOptions, CreateTableOptions, CancellationToken)
public virtual Task<BigQueryTable> GetOrCreateTableAsync(string datasetId, string tableId, Table resource, GetTableOptions getOptions = null, CreateTableOptions createOptions = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously attempts to fetch the specified table within this client's project, creating it if it doesn't exist. This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to GetOrCreateTableAsync(TableReference, Table, GetTableOptions, CreateTableOptions, CancellationToken).
Parameters | |
---|---|
Name | Description |
datasetId | String The dataset ID. Must not be null. |
tableId | String The table ID. Must not be null. |
resource | Google.Apis.Bigquery.v2.Data.Table The table resource representation to use for the creation. Must not be null. If this table's Google.Apis.Bigquery.v2.Data.Table.TableReference is specified, then it must be the same as the one obtained from the other parameters, else it will be set to the one obtained from the other parameters. |
getOptions | GetTableOptions The options for the "get" operation. May be null, in which case defaults will be supplied. |
createOptions | CreateTableOptions The options for the "create" operation. May be null, in which case defaults will be supplied. |
cancellationToken | CancellationToken The token to monitor for cancellation requests. |
Returns | |
---|---|
Type | Description |
Task<BigQueryTable> | A task representing the asynchronous operation. When complete, the result is the existing or new table. |
See GetOrCreateTableAsync for an example using an alternative overload.
GetOrCreateTableAsync(String, String, TableSchema, GetTableOptions, CreateTableOptions, CancellationToken)
public virtual Task<BigQueryTable> GetOrCreateTableAsync(string datasetId, string tableId, TableSchema schema, GetTableOptions getOptions = null, CreateTableOptions createOptions = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously attempts to fetch the specified table within this client's project, creating it if it doesn't exist. This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to GetOrCreateTableAsync(TableReference, TableSchema, GetTableOptions, CreateTableOptions, CancellationToken).
Parameters | |
---|---|
Name | Description |
datasetId | String The dataset ID. Must not be null. |
tableId | String The table ID. Must not be null. |
schema | Google.Apis.Bigquery.v2.Data.TableSchema The schema for the new table. Must not be null. |
getOptions | GetTableOptions The options for the "get" operation. May be null, in which case defaults will be supplied. |
createOptions | CreateTableOptions The options for the "create" operation. May be null, in which case defaults will be supplied. |
cancellationToken | CancellationToken The token to monitor for cancellation requests. |
Returns | |
---|---|
Type | Description |
Task<BigQueryTable> | A task representing the asynchronous operation. When complete, the result is the existing or new table. |
BigQueryClient client = await BigQueryClient.CreateAsync(projectId);
TableSchema schema = new TableSchemaBuilder
{
{ "from_player", BigQueryDbType.String },
{ "to_player", BigQueryDbType.String },
{ "message", BigQueryDbType.String }
}.Build();
// If the table isn't found, it will be created.
BigQueryTable table = await client.GetOrCreateTableAsync(datasetId, tableId, schema);
// Now populate the table with data...
GetOrCreateTableAsync(String, String, String, Table, GetTableOptions, CreateTableOptions, CancellationToken)
public virtual Task<BigQueryTable> GetOrCreateTableAsync(string projectId, string datasetId, string tableId, Table resource, GetTableOptions getOptions = null, CreateTableOptions createOptions = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously attempts to fetch the specified table, creating it if it doesn't exist. This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to GetOrCreateTableAsync(TableReference, Table, GetTableOptions, CreateTableOptions, CancellationToken).
Parameters | |
---|---|
Name | Description |
projectId | String The project ID. Must not be null. |
datasetId | String The dataset ID. Must not be null. |
tableId | String The table ID. Must not be null. |
resource | Google.Apis.Bigquery.v2.Data.Table The table resource representation to use for the creation. Must not be null. If this table's Google.Apis.Bigquery.v2.Data.Table.TableReference is specified, then it must be the same as the one obtained from the other parameters, else it will be set to the one obtained from the other parameters. |
getOptions | GetTableOptions The options for the "get" operation. May be null, in which case defaults will be supplied. |
createOptions | CreateTableOptions The options for the "create" operation. May be null, in which case defaults will be supplied. |
cancellationToken | CancellationToken The token to monitor for cancellation requests. |
Returns | |
---|---|
Type | Description |
Task<BigQueryTable> | A task representing the asynchronous operation. When complete, the result is the existing or new table. |
See GetOrCreateTableAsync for an example using an alternative overload.
GetOrCreateTableAsync(String, String, String, TableSchema, GetTableOptions, CreateTableOptions, CancellationToken)
public virtual Task<BigQueryTable> GetOrCreateTableAsync(string projectId, string datasetId, string tableId, TableSchema schema, GetTableOptions getOptions = null, CreateTableOptions createOptions = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously attempts to fetch the specified table, creating it if it doesn't exist. This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to GetOrCreateTableAsync(TableReference, TableSchema, GetTableOptions, CreateTableOptions, CancellationToken).
Parameters | |
---|---|
Name | Description |
projectId | String The project ID. Must not be null. |
datasetId | String The dataset ID. Must not be null. |
tableId | String The table ID. Must not be null. |
schema | Google.Apis.Bigquery.v2.Data.TableSchema The schema for the new table. Must not be null. |
getOptions | GetTableOptions The options for the "get" operation. May be null, in which case defaults will be supplied. |
createOptions | CreateTableOptions The options for the "create" operation. May be null, in which case defaults will be supplied. |
cancellationToken | CancellationToken The token to monitor for cancellation requests. |
Returns | |
---|---|
Type | Description |
Task<BigQueryTable> | A task representing the asynchronous operation. When complete, the result is the existing or new table. |
See GetOrCreateTableAsync for an example using an alternative overload.
GetProjectReference(String)
public ProjectReference GetProjectReference(string projectId)
Creates a Google.Apis.Bigquery.v2.Data.ProjectReference from the given project ID.
Parameter | |
---|---|
Name | Description |
projectId | String The project ID. Must not be null. |
Returns | |
---|---|
Type | Description |
Google.Apis.Bigquery.v2.Data.ProjectReference | A Google.Apis.Bigquery.v2.Data.ProjectReference representing the requested project. |
BigQueryClient client = BigQueryClient.Create(projectId);
ProjectReference reference = client.GetProjectReference("other-project");
Console.WriteLine(reference.ProjectId);
GetQueryResults(JobReference, GetQueryResultsOptions)
public virtual BigQueryResults GetQueryResults(JobReference jobReference, GetQueryResultsOptions options = null)
Retrieves the results of the specified job, which must be a query job.
Parameters | |
---|---|
Name | Description |
jobReference | Google.Apis.Bigquery.v2.Data.JobReference A fully-qualified identifier for the job. Must not be null. |
options | GetQueryResultsOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
BigQueryResults | The results of the query. |
This operation will only complete when the specified query has completed.
BigQueryClient client = BigQueryClient.Create(projectId);
BigQueryTable table = client.GetTable(datasetId, historyTableId);
TableReference destination = client.GetTableReference(datasetId, queryTableId);
// If the destination table is not specified, the results will be stored in
// a temporary table.
BigQueryJob job = client.CreateQueryJob(
$@"SELECT player, MAX(score) AS score
FROM {table}
GROUP BY player
ORDER BY score DESC",
null, // No parameters
new QueryOptions { DestinationTable = destination });
// Wait for the job to complete.
job.PollUntilCompleted();
// Then we can fetch the results, either via the job or by accessing
// the destination table.
BigQueryResults result = client.GetQueryResults(job.Reference);
foreach (BigQueryRow row in result)
{
Console.WriteLine($"{row["player"]}: {row["score"]}");
}
GetQueryResults(String, GetQueryResultsOptions)
public virtual BigQueryResults GetQueryResults(string jobId, GetQueryResultsOptions options = null)
Retrieves the results of the specified job within this client's project, which must be a query job. This method just creates a Google.Apis.Bigquery.v2.Data.JobReference and delegates to GetQueryResults(JobReference, GetQueryResultsOptions).
Parameters | |
---|---|
Name | Description |
jobId | String The job ID. Must not be null. |
options | GetQueryResultsOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
BigQueryResults | The results of the query. |
This operation will only complete when the specified query has completed.
See GetQueryResults for an example using an alternative overload.
GetQueryResults(String, String, GetQueryResultsOptions)
public virtual BigQueryResults GetQueryResults(string projectId, string jobId, GetQueryResultsOptions options = null)
Retrieves the results of the specified job, which must be a query job. This method just creates a Google.Apis.Bigquery.v2.Data.JobReference and delegates to GetQueryResults(JobReference, GetQueryResultsOptions).
Parameters | |
---|---|
Name | Description |
projectId | String The project ID. Must not be null. |
jobId | String The job ID. Must not be null. |
options | GetQueryResultsOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
BigQueryResults | The results of the query. |
This operation will only complete when the specified query has completed.
See GetQueryResults for an example using an alternative overload.
GetQueryResultsAsync(JobReference, GetQueryResultsOptions, CancellationToken)
public virtual Task<BigQueryResults> GetQueryResultsAsync(JobReference jobReference, GetQueryResultsOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously retrieves the results of the specified job, which must be a query job.
Parameters | |
---|---|
Name | Description |
jobReference | Google.Apis.Bigquery.v2.Data.JobReference A fully-qualified identifier for the job. Must not be null. |
options | GetQueryResultsOptions 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<BigQueryResults> | A task representing the asynchronous operation. When complete, the result is the results of the query. |
This operation will only complete when the specified query has completed.
BigQueryClient client = await BigQueryClient.CreateAsync(projectId);
BigQueryTable table = await client.GetTableAsync(datasetId, historyTableId);
TableReference destination = client.GetTableReference(datasetId, queryTableId);
// If the destination table is not specified, the results will be stored in
// a temporary table.
BigQueryJob job = await client.CreateQueryJobAsync(
$@"SELECT player, MAX(score) AS score
FROM {table}
GROUP BY player
ORDER BY score DESC",
null, // No parameters
new QueryOptions { DestinationTable = destination });
// Wait for the job to complete.
await job.PollUntilCompletedAsync();
// Then we can fetch the results, either via the job or by accessing
// the destination table.
BigQueryResults result = await client.GetQueryResultsAsync(job.Reference);
await result.GetRowsAsync().ForEachAsync(row =>
{
Console.WriteLine($"{row["player"]}: {row["score"]}");
});
GetQueryResultsAsync(String, GetQueryResultsOptions, CancellationToken)
public virtual Task<BigQueryResults> GetQueryResultsAsync(string jobId, GetQueryResultsOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously retrieves the results of the specified job within this client's project, which must be a query job. This method just creates a Google.Apis.Bigquery.v2.Data.JobReference and delegates to GetQueryResultsAsync(JobReference, GetQueryResultsOptions, CancellationToken).
Parameters | |
---|---|
Name | Description |
jobId | String The job ID. Must not be null. |
options | GetQueryResultsOptions 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<BigQueryResults> | A task representing the asynchronous operation. When complete, the result is the results of the query. |
This operation will only complete when the specified query has completed.
See GetQueryResults for an example using an alternative overload.
GetQueryResultsAsync(String, String, GetQueryResultsOptions, CancellationToken)
public virtual Task<BigQueryResults> GetQueryResultsAsync(string projectId, string jobId, GetQueryResultsOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously retrieves the results of the specified job, which must be a query job. This method just creates a Google.Apis.Bigquery.v2.Data.JobReference and delegates to GetQueryResultsAsync(JobReference, GetQueryResultsOptions, CancellationToken).
Parameters | |
---|---|
Name | Description |
projectId | String The project ID. Must not be null. |
jobId | String The job ID. Must not be null. |
options | GetQueryResultsOptions 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<BigQueryResults> | A task representing the asynchronous operation. When complete, the result is the results of the query. |
This operation will only complete when the specified query has completed.
See GetQueryResults for an example using an alternative overload.
GetRoutine(RoutineReference, GetRoutineOptions)
public virtual BigQueryRoutine GetRoutine(RoutineReference routineReference, GetRoutineOptions options = null)
Retrieves the specified routine.
Parameters | |
---|---|
Name | Description |
routineReference | Google.Apis.Bigquery.v2.Data.RoutineReference A fully-qualified identifier for the routine. Must not be null. |
options | GetRoutineOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
BigQueryRoutine | The requested routine. |
GetRoutine(String, String, GetRoutineOptions)
public virtual BigQueryRoutine GetRoutine(string datasetId, string routineId, GetRoutineOptions options = null)
Retrieves the specified routine within this client's project. This method just creates a Google.Apis.Bigquery.v2.Data.RoutineReference and delegates to GetRoutine(RoutineReference, GetRoutineOptions).
Parameters | |
---|---|
Name | Description |
datasetId | String The dataset ID. Must not be null. |
routineId | String The routine ID. Must not be null. |
options | GetRoutineOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
BigQueryRoutine | The requested routine. |
GetRoutine(String, String, String, GetRoutineOptions)
public virtual BigQueryRoutine GetRoutine(string projectId, string datasetId, string routineId, GetRoutineOptions options = null)
Retrieves the specified routine. This method just creates a Google.Apis.Bigquery.v2.Data.RoutineReference and delegates to GetRoutine(RoutineReference, GetRoutineOptions).
Parameters | |
---|---|
Name | Description |
projectId | String The project ID. Must not be null. |
datasetId | String The dataset ID. Must not be null. |
routineId | String The routine ID. Must not be null. |
options | GetRoutineOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
BigQueryRoutine | The requested routine. |
GetRoutineAsync(RoutineReference, GetRoutineOptions, CancellationToken)
public virtual Task<BigQueryRoutine> GetRoutineAsync(RoutineReference routineReference, GetRoutineOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously retrieves the specified routine.
Parameters | |
---|---|
Name | Description |
routineReference | Google.Apis.Bigquery.v2.Data.RoutineReference A fully-qualified identifier for the routine. Must not be null. |
options | GetRoutineOptions 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<BigQueryRoutine> | A task representing the asynchronous operation. When complete, the result is the requested routine. |
GetRoutineAsync(String, String, GetRoutineOptions, CancellationToken)
public virtual Task<BigQueryRoutine> GetRoutineAsync(string datasetId, string routineId, GetRoutineOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously retrieves the specified routine within this client's project. This method just creates a Google.Apis.Bigquery.v2.Data.RoutineReference and delegates to GetRoutineAsync(RoutineReference, GetRoutineOptions, CancellationToken).
Parameters | |
---|---|
Name | Description |
datasetId | String The dataset ID. Must not be null. |
routineId | String The routine ID. Must not be null. |
options | GetRoutineOptions 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<BigQueryRoutine> | A task representing the asynchronous operation. When complete, the result is the requested routine. |
GetRoutineAsync(String, String, String, GetRoutineOptions, CancellationToken)
public virtual Task<BigQueryRoutine> GetRoutineAsync(string projectId, string datasetId, string routineId, GetRoutineOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously retrieves the specified routine. This method just creates a Google.Apis.Bigquery.v2.Data.RoutineReference and delegates to GetRoutineAsync(RoutineReference, GetRoutineOptions, CancellationToken).
Parameters | |
---|---|
Name | Description |
projectId | String The project ID. Must not be null. |
datasetId | String The dataset ID. Must not be null. |
routineId | String The routine ID. Must not be null. |
options | GetRoutineOptions 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<BigQueryRoutine> | A task representing the asynchronous operation. When complete, the result is the requested routine. |
GetRoutineReference(String, String)
public RoutineReference GetRoutineReference(string datasetId, string routineId)
Creates a Google.Apis.Bigquery.v2.Data.RoutineReference from the given dataset ID and routine ID, using this client's project ID.
Parameters | |
---|---|
Name | Description |
datasetId | String The dataset ID. Must not be null. |
routineId | String The routine ID. Must not be null. |
Returns | |
---|---|
Type | Description |
Google.Apis.Bigquery.v2.Data.RoutineReference | A Google.Apis.Bigquery.v2.Data.RoutineReference representing the requested routine. |
GetRoutineReference(String, String, String)
public RoutineReference GetRoutineReference(string projectId, string datasetId, string routineId)
Creates a Google.Apis.Bigquery.v2.Data.RoutineReference from the given project ID, dataset ID and routine ID.
Parameters | |
---|---|
Name | Description |
projectId | String The project ID. Must not be null. |
datasetId | String The dataset ID. Must not be null. |
routineId | String The routine ID. Must not be null. |
Returns | |
---|---|
Type | Description |
Google.Apis.Bigquery.v2.Data.RoutineReference | A Google.Apis.Bigquery.v2.Data.RoutineReference representing the requested routine. |
GetTable(TableReference, GetTableOptions)
public virtual BigQueryTable GetTable(TableReference tableReference, GetTableOptions options = null)
Retrieves the specified table.
Parameters | |
---|---|
Name | Description |
tableReference | Google.Apis.Bigquery.v2.Data.TableReference A fully-qualified identifier for the table. Must not be null. |
options | GetTableOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
BigQueryTable | The requested table. |
See GetTable for an example using an alternative overload.
GetTable(String, String, GetTableOptions)
public virtual BigQueryTable GetTable(string datasetId, string tableId, GetTableOptions options = null)
Retrieves the specified table within this client's project. This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to GetTable(TableReference, GetTableOptions).
Parameters | |
---|---|
Name | Description |
datasetId | String The dataset ID. Must not be null. |
tableId | String The table ID. Must not be null. |
options | GetTableOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
BigQueryTable | The requested table. |
BigQueryClient client = BigQueryClient.Create(projectId);
BigQueryTable table = client.GetTable(datasetId, tableId);
Console.WriteLine(table.FullyQualifiedId);
GetTable(String, String, String, GetTableOptions)
public virtual BigQueryTable GetTable(string projectId, string datasetId, string tableId, GetTableOptions options = null)
Retrieves the specified table. This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to GetTable(TableReference, GetTableOptions).
Parameters | |
---|---|
Name | Description |
projectId | String The project ID. Must not be null. |
datasetId | String The dataset ID. Must not be null. |
tableId | String The table ID. Must not be null. |
options | GetTableOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
BigQueryTable | The requested table. |
See GetTable for an example using an alternative overload.
GetTableAsync(TableReference, GetTableOptions, CancellationToken)
public virtual Task<BigQueryTable> GetTableAsync(TableReference tableReference, GetTableOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously retrieves the specified table.
Parameters | |
---|---|
Name | Description |
tableReference | Google.Apis.Bigquery.v2.Data.TableReference A fully-qualified identifier for the table. Must not be null. |
options | GetTableOptions 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<BigQueryTable> | A task representing the asynchronous operation. When complete, the result is the requested table. |
See GetTable for a synchronous example.
GetTableAsync(String, String, GetTableOptions, CancellationToken)
public virtual Task<BigQueryTable> GetTableAsync(string datasetId, string tableId, GetTableOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously retrieves the specified table within this client's project. This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to GetTableAsync(TableReference, GetTableOptions, CancellationToken).
Parameters | |
---|---|
Name | Description |
datasetId | String The dataset ID. Must not be null. |
tableId | String The table ID. Must not be null. |
options | GetTableOptions 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<BigQueryTable> | A task representing the asynchronous operation. When complete, the result is the requested table. |
See GetTable for a synchronous example.
GetTableAsync(String, String, String, GetTableOptions, CancellationToken)
public virtual Task<BigQueryTable> GetTableAsync(string projectId, string datasetId, string tableId, GetTableOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously retrieves the specified table. This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to GetTableAsync(TableReference, GetTableOptions, CancellationToken).
Parameters | |
---|---|
Name | Description |
projectId | String The project ID. Must not be null. |
datasetId | String The dataset ID. Must not be null. |
tableId | String The table ID. Must not be null. |
options | GetTableOptions 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<BigQueryTable> | A task representing the asynchronous operation. When complete, the result is the requested table. |
See GetTable for a synchronous example.
GetTableIamPolicy(TableReference, GetTableIamPolicyOptions)
public virtual Policy GetTableIamPolicy(TableReference tableReference, GetTableIamPolicyOptions options = null)
Gets the IAM policy applied to the specified table.
Parameters | |
---|---|
Name | Description |
tableReference | Google.Apis.Bigquery.v2.Data.TableReference A fully-qualified identifier for the table. Must not be null. |
options | GetTableIamPolicyOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
Google.Apis.Bigquery.v2.Data.Policy | The table's IAM policy. |
GetTableIamPolicy(String, String, GetTableIamPolicyOptions)
public virtual Policy GetTableIamPolicy(string datasetId, string tableId, GetTableIamPolicyOptions options = null)
Gets the IAM policy applied to the specified table within this client's project. This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to GetTableIamPolicy(TableReference, GetTableIamPolicyOptions).
Parameters | |
---|---|
Name | Description |
datasetId | String The dataset ID. Must not be null. |
tableId | String The table ID. Must not be null. |
options | GetTableIamPolicyOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
Google.Apis.Bigquery.v2.Data.Policy | The table's IAM policy. |
GetTableIamPolicy(String, String, String, GetTableIamPolicyOptions)
public virtual Policy GetTableIamPolicy(string projectId, string datasetId, string tableId, GetTableIamPolicyOptions options = null)
Gets the IAM policy applied to the specified table. This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to GetTableIamPolicy(TableReference, GetTableIamPolicyOptions).
Parameters | |
---|---|
Name | Description |
projectId | String The project ID. Must not be null. |
datasetId | String The dataset ID. Must not be null. |
tableId | String The table ID. Must not be null. |
options | GetTableIamPolicyOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
Google.Apis.Bigquery.v2.Data.Policy | The table's IAM policy. |
GetTableIamPolicyAsync(TableReference, GetTableIamPolicyOptions, CancellationToken)
public virtual Task<Policy> GetTableIamPolicyAsync(TableReference tableReference, GetTableIamPolicyOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously gets the IAM policy applied to the specified table.
Parameters | |
---|---|
Name | Description |
tableReference | Google.Apis.Bigquery.v2.Data.TableReference A fully-qualified identifier for the table. Must not be null. |
options | GetTableIamPolicyOptions 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<Google.Apis.Bigquery.v2.Data.Policy> | A task representing the asynchronous operation. When complete, the result is the table's IAM policy. |
GetTableIamPolicyAsync(String, String, GetTableIamPolicyOptions, CancellationToken)
public virtual Task<Policy> GetTableIamPolicyAsync(string datasetId, string tableId, GetTableIamPolicyOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously gets the IAM policy applied to the specified table within this client's project. This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to GetTableIamPolicyAsync(TableReference, GetTableIamPolicyOptions, CancellationToken).
Parameters | |
---|---|
Name | Description |
datasetId | String The dataset ID. Must not be null. |
tableId | String The table ID. Must not be null. |
options | GetTableIamPolicyOptions 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<Google.Apis.Bigquery.v2.Data.Policy> | A task representing the asynchronous operation. When complete, the result is the table's IAM policy. |
GetTableIamPolicyAsync(String, String, String, GetTableIamPolicyOptions, CancellationToken)
public virtual Task<Policy> GetTableIamPolicyAsync(string projectId, string datasetId, string tableId, GetTableIamPolicyOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously gets the IAM policy applied to the specified table. This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to GetTableIamPolicyAsync(TableReference, GetTableIamPolicyOptions, CancellationToken).
Parameters | |
---|---|
Name | Description |
projectId | String The project ID. Must not be null. |
datasetId | String The dataset ID. Must not be null. |
tableId | String The table ID. Must not be null. |
options | GetTableIamPolicyOptions 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<Google.Apis.Bigquery.v2.Data.Policy> | A task representing the asynchronous operation. When complete, the result is the table's IAM policy. |
GetTableReference(String, String)
public TableReference GetTableReference(string datasetId, string tableId)
Creates a Google.Apis.Bigquery.v2.Data.TableReference from the given dataset ID and table ID, using this client's project ID.
Parameters | |
---|---|
Name | Description |
datasetId | String The dataset ID. Must not be null. |
tableId | String The table ID. Must not be null. |
Returns | |
---|---|
Type | Description |
Google.Apis.Bigquery.v2.Data.TableReference | A Google.Apis.Bigquery.v2.Data.TableReference representing the requested table. |
BigQueryClient client = BigQueryClient.Create(projectId);
TableReference reference = client.GetTableReference("dataset", "table");
// ProjectId is defaulted from the client in this overload
Console.WriteLine(reference.ProjectId);
GetTableReference(String, String, String)
public TableReference GetTableReference(string projectId, string datasetId, string tableId)
Creates a Google.Apis.Bigquery.v2.Data.TableReference from the given project ID, dataset ID and table ID.
Parameters | |
---|---|
Name | Description |
projectId | String The project ID. Must not be null. |
datasetId | String The dataset ID. Must not be null. |
tableId | String The table ID. Must not be null. |
Returns | |
---|---|
Type | Description |
Google.Apis.Bigquery.v2.Data.TableReference | A Google.Apis.Bigquery.v2.Data.TableReference representing the requested table. |
BigQueryClient client = BigQueryClient.Create(projectId);
TableReference reference = client.GetTableReference("other-project", "dataset", "table");
// ProjectId is as specified in the call, not the client's project
Console.WriteLine(reference.ProjectId);
InsertRow(TableReference, BigQueryInsertRow, InsertOptions)
public virtual BigQueryInsertResults InsertRow(TableReference tableReference, BigQueryInsertRow row, InsertOptions options = null)
Inserts a single row of data into a table. This method just creates an array with the single element and delegates to InsertRows(TableReference, IEnumerable<BigQueryInsertRow>, InsertOptions).
Parameters | |
---|---|
Name | Description |
tableReference | Google.Apis.Bigquery.v2.Data.TableReference A fully-qualified identifier for the table. Must not be null. |
row | BigQueryInsertRow The data to insert. Must not be null. |
options | InsertOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
BigQueryInsertResults | An insert result object which contains information on insert errors if any. |
See InsertRow for an example using an alternative overload.
InsertRow(String, String, BigQueryInsertRow, InsertOptions)
public virtual BigQueryInsertResults InsertRow(string datasetId, string tableId, BigQueryInsertRow row, InsertOptions options = null)
Inserts a single row of data into a table in this client's project specified by dataset ID and table ID. This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to InsertRow(TableReference, BigQueryInsertRow, InsertOptions).
Parameters | |
---|---|
Name | Description |
datasetId | String The dataset ID. Must not be null. |
tableId | String The table ID. Must not be null. |
row | BigQueryInsertRow The data to insert. Must not be null. |
options | InsertOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
BigQueryInsertResults | An insert result object which contains information on insert errors if any. |
BigQueryClient client = BigQueryClient.Create(projectId);
// The insert ID is optional; it is autogenerated if not specified.
BigQueryInsertRow row = new BigQueryInsertRow("row-single")
{
{ "player", "Jane" },
{ "level", 3 },
{ "score", 3600 },
{ "game_started", DateTime.UtcNow }
};
client.InsertRow(datasetId, tableId, row);
InsertRow(String, String, String, BigQueryInsertRow, InsertOptions)
public virtual BigQueryInsertResults InsertRow(string projectId, string datasetId, string tableId, BigQueryInsertRow row, InsertOptions options = null)
Inserts a single row of data into a table specified by project ID, dataset ID and table ID. This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to InsertRow(TableReference, BigQueryInsertRow, InsertOptions).
Parameters | |
---|---|
Name | Description |
projectId | String The project ID. Must not be null. |
datasetId | String The dataset ID. Must not be null. |
tableId | String The table ID. Must not be null. |
row | BigQueryInsertRow The data to insert. Must not be null. |
options | InsertOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
BigQueryInsertResults | An insert result object which contains information on insert errors if any. |
See InsertRow for an example using an alternative overload.
InsertRowAsync(TableReference, BigQueryInsertRow, InsertOptions, CancellationToken)
public virtual Task<BigQueryInsertResults> InsertRowAsync(TableReference tableReference, BigQueryInsertRow row, InsertOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously inserts a single row of data into a table. This method just creates an array with the single element and delegates to InsertRowsAsync(TableReference, IEnumerable<BigQueryInsertRow>, InsertOptions, CancellationToken).
Parameters | |
---|---|
Name | Description |
tableReference | Google.Apis.Bigquery.v2.Data.TableReference A fully-qualified identifier for the table. Must not be null. |
row | BigQueryInsertRow The data to insert. Must not be null. |
options | InsertOptions 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<BigQueryInsertResults> | A task representing the asynchronous operation. When complete, the result is an insert result object which contains information on insert errors if any. |
See InsertRow for a synchronous example.
InsertRowAsync(String, String, BigQueryInsertRow, InsertOptions, CancellationToken)
public virtual Task<BigQueryInsertResults> InsertRowAsync(string datasetId, string tableId, BigQueryInsertRow row, InsertOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously inserts a single row of data into a table in this client's project specified by dataset ID and table ID. This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to InsertRowAsync(TableReference, BigQueryInsertRow, InsertOptions, CancellationToken).
Parameters | |
---|---|
Name | Description |
datasetId | String The dataset ID. Must not be null. |
tableId | String The table ID. Must not be null. |
row | BigQueryInsertRow The data to insert. Must not be null. |
options | InsertOptions 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<BigQueryInsertResults> | A task representing the asynchronous operation. When complete, the result is an insert result object which contains information on insert errors if any. |
See InsertRow for a synchronous example.
InsertRowAsync(String, String, String, BigQueryInsertRow, InsertOptions, CancellationToken)
public virtual Task<BigQueryInsertResults> InsertRowAsync(string projectId, string datasetId, string tableId, BigQueryInsertRow row, InsertOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously inserts a single row of data into a table specified by project ID, dataset ID and table ID. This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to InsertRowAsync(TableReference, BigQueryInsertRow, InsertOptions, CancellationToken).
Parameters | |
---|---|
Name | Description |
projectId | String The project ID. Must not be null. |
datasetId | String The dataset ID. Must not be null. |
tableId | String The table ID. Must not be null. |
row | BigQueryInsertRow The data to insert. Must not be null. |
options | InsertOptions 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<BigQueryInsertResults> | A task representing the asynchronous operation. When complete, the result is an insert result object which contains information on insert errors if any. |
See InsertRow for a synchronous example.
InsertRows(TableReference, BigQueryInsertRow[])
public virtual BigQueryInsertResults InsertRows(TableReference tableReference, params BigQueryInsertRow[] rows)
Inserts all the specified rows into a table. This method just delegates to InsertRows(TableReference, IEnumerable<BigQueryInsertRow>, InsertOptions).
Parameters | |
---|---|
Name | Description |
tableReference | Google.Apis.Bigquery.v2.Data.TableReference A fully-qualified identifier for the table. Must not be null. |
rows | BigQueryInsertRow[] The rows to insert. Must not be null, or contain null elements. |
Returns | |
---|---|
Type | Description |
BigQueryInsertResults | An insert result object which contains information on insert errors if any. |
Options are not supported on this call due to restrictions with methods containing a parameter array and optional parameters. To specify options, create a collection or array explicitly, and call InsertRows(TableReference, IEnumerable<BigQueryInsertRow>, InsertOptions).
See InsertRows for an example using an alternative overload.
InsertRows(TableReference, IEnumerable<BigQueryInsertRow>, InsertOptions)
public virtual BigQueryInsertResults InsertRows(TableReference tableReference, IEnumerable<BigQueryInsertRow> rows, InsertOptions options = null)
Inserts all the given rows of data into the specified table.
Parameters | |
---|---|
Name | Description |
tableReference | Google.Apis.Bigquery.v2.Data.TableReference A fully-qualified identifier for the table. Must not be null. |
rows | IEnumerable<BigQueryInsertRow> The data to insert. Must not be null, or contain null entries. |
options | InsertOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
BigQueryInsertResults | An insert result object which contains information on insert errors if any. |
See InsertRows for an example using an alternative overload.
InsertRows(String, String, BigQueryInsertRow[])
public virtual BigQueryInsertResults InsertRows(string datasetId, string tableId, params BigQueryInsertRow[] rows)
Inserts all the specified rows into a table in this client's project. This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to InsertRows(TableReference, BigQueryInsertRow[]).
Parameters | |
---|---|
Name | Description |
datasetId | String The dataset ID. Must not be null. |
tableId | String The table ID. Must not be null. |
rows | BigQueryInsertRow[] The rows to insert. Must not be null, or contain null elements. |
Returns | |
---|---|
Type | Description |
BigQueryInsertResults | An insert result object which contains information on insert errors if any. |
Options are not supported on this call due to restrictions with methods containing a parameter array and optional parameters. To specify options, create a collection or array explicitly, and call InsertRows(String, String, IEnumerable<BigQueryInsertRow>, InsertOptions).
BigQueryClient client = BigQueryClient.Create(projectId);
// The insert ID is optional; it is autogenerated if not specified.
BigQueryInsertRow row1 = new BigQueryInsertRow("row1")
{
{ "player", "Jane" },
{ "level", 3 },
{ "score", 3600 },
{ "game_started", DateTime.UtcNow }
};
BigQueryInsertRow row2 = new BigQueryInsertRow("row2")
{
{ "player", "Jeff" },
{ "level", 2 },
{ "score", 2000 },
{ "game_started", DateTime.UtcNow }
};
client.InsertRows(datasetId, tableId, row1, row2);
InsertRows(String, String, IEnumerable<BigQueryInsertRow>, InsertOptions)
public virtual BigQueryInsertResults InsertRows(string datasetId, string tableId, IEnumerable<BigQueryInsertRow> rows, InsertOptions options = null)
Inserts all the given rows of data into the specified table within this client's project. This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to InsertRows(TableReference, IEnumerable<BigQueryInsertRow>, InsertOptions).
Parameters | |
---|---|
Name | Description |
datasetId | String The dataset ID. Must not be null. |
tableId | String The table ID. Must not be null. |
rows | IEnumerable<BigQueryInsertRow> The data to insert. Must not be null, or contain null entries. |
options | InsertOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
BigQueryInsertResults | An insert result object which contains information on insert errors if any. |
See InsertRows for an example using an alternative overload.
InsertRows(String, String, String, BigQueryInsertRow[])
public virtual BigQueryInsertResults InsertRows(string projectId, string datasetId, string tableId, params BigQueryInsertRow[] rows)
Inserts all the specified rows into a table. This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to InsertRows(TableReference, BigQueryInsertRow[]).
Parameters | |
---|---|
Name | Description |
projectId | String The project ID. Must not be null. |
datasetId | String The dataset ID. Must not be null. |
tableId | String The table ID. Must not be null. |
rows | BigQueryInsertRow[] The rows to insert. Must not be null, or contain null elements. |
Returns | |
---|---|
Type | Description |
BigQueryInsertResults | An insert result object which contains information on insert errors if any. |
Options are not supported on this call due to restrictions with methods containing a parameter array and optional parameters. To specify options, create a collection or array explicitly, and call InsertRows(String, String, String, IEnumerable<BigQueryInsertRow>, InsertOptions).
See InsertRows for an example using an alternative overload.
InsertRows(String, String, String, IEnumerable<BigQueryInsertRow>, InsertOptions)
public virtual BigQueryInsertResults InsertRows(string projectId, string datasetId, string tableId, IEnumerable<BigQueryInsertRow> rows, InsertOptions options = null)
Inserts all the given rows of data into the specified table. This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to InsertRows(TableReference, IEnumerable<BigQueryInsertRow>, InsertOptions).
Parameters | |
---|---|
Name | Description |
projectId | String The project ID. Must not be null. |
datasetId | String The dataset ID. Must not be null. |
tableId | String The table ID. Must not be null. |
rows | IEnumerable<BigQueryInsertRow> The data to insert. Must not be null, or contain null entries. |
options | InsertOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
BigQueryInsertResults | An insert result object which contains information on insert errors if any. |
See InsertRows for an example using an alternative overload.
InsertRowsAsync(TableReference, BigQueryInsertRow[])
public virtual Task<BigQueryInsertResults> InsertRowsAsync(TableReference tableReference, params BigQueryInsertRow[] rows)
Asynchronously inserts all the specified rows into a table. This method just delegates to InsertRowsAsync(TableReference, IEnumerable<BigQueryInsertRow>, InsertOptions, CancellationToken).
Parameters | |
---|---|
Name | Description |
tableReference | Google.Apis.Bigquery.v2.Data.TableReference A fully-qualified identifier for the table. Must not be null. |
rows | BigQueryInsertRow[] The rows to insert. Must not be null, or contain null elements. |
Returns | |
---|---|
Type | Description |
Task<BigQueryInsertResults> | A task representing the asynchronous operation. When complete, the result is an insert result object which contains information on insert errors if any. |
Options and cancellation tokens are not supported on this call due to restrictions with methods containing a parameter array and optional parameters. To specify options, create a collection or array explicitly, and call InsertRowsAsync(TableReference, IEnumerable<BigQueryInsertRow>, InsertOptions, CancellationToken).
See InsertRowsAsync for an example using an alternative overload.
InsertRowsAsync(TableReference, IEnumerable<BigQueryInsertRow>, InsertOptions, CancellationToken)
public virtual Task<BigQueryInsertResults> InsertRowsAsync(TableReference tableReference, IEnumerable<BigQueryInsertRow> rows, InsertOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously inserts all the given rows of data into the specified table.
Parameters | |
---|---|
Name | Description |
tableReference | Google.Apis.Bigquery.v2.Data.TableReference A fully-qualified identifier for the table. Must not be null. |
rows | IEnumerable<BigQueryInsertRow> The data to insert. Must not be null, or contain null entries. |
options | InsertOptions 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<BigQueryInsertResults> | A task representing the asynchronous operation. When complete, the result is an insert result object which contains information on insert errors if any. |
See InsertRowsAsync for an example using an alternative overload.
InsertRowsAsync(String, String, BigQueryInsertRow[])
public virtual Task<BigQueryInsertResults> InsertRowsAsync(string datasetId, string tableId, params BigQueryInsertRow[] rows)
Asynchronously inserts all the specified rows into a table in this client's project. This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to InsertRowsAsync(TableReference, BigQueryInsertRow[]).
Parameters | |
---|---|
Name | Description |
datasetId | String The dataset ID. Must not be null. |
tableId | String The table ID. Must not be null. |
rows | BigQueryInsertRow[] The rows to insert. Must not be null, or contain null elements. |
Returns | |
---|---|
Type | Description |
Task<BigQueryInsertResults> | A task representing the asynchronous operation. When complete, the result is an insert result object which contains information on insert errors if any. |
Options and cancellation tokens are not supported on this call due to restrictions with methods containing a parameter array and optional parameters. To specify options, create a collection or array explicitly, and call InsertRowsAsync(String, String, IEnumerable<BigQueryInsertRow>, InsertOptions, CancellationToken).
BigQueryClient client = await BigQueryClient.CreateAsync(projectId);
// The insert ID is optional; it is autogenerated if not specified.
BigQueryInsertRow row1 = new BigQueryInsertRow("row1-async")
{
{ "player", "Jane" },
{ "level", 3 },
{ "score", 3600 },
{ "game_started", DateTime.UtcNow }
};
BigQueryInsertRow row2 = new BigQueryInsertRow("row2-async")
{
{ "player", "Jeff" },
{ "level", 2 },
{ "score", 2000 },
{ "game_started", DateTime.UtcNow }
};
await client.InsertRowsAsync(datasetId, tableId, row1, row2);
InsertRowsAsync(String, String, IEnumerable<BigQueryInsertRow>, InsertOptions, CancellationToken)
public virtual Task<BigQueryInsertResults> InsertRowsAsync(string datasetId, string tableId, IEnumerable<BigQueryInsertRow> rows, InsertOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously inserts all the given rows of data into the specified table within this client's project. This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to InsertRowsAsync(TableReference, IEnumerable<BigQueryInsertRow>, InsertOptions, CancellationToken).
Parameters | |
---|---|
Name | Description |
datasetId | String The dataset ID. Must not be null. |
tableId | String The table ID. Must not be null. |
rows | IEnumerable<BigQueryInsertRow> The data to insert. Must not be null, or contain null entries. |
options | InsertOptions 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<BigQueryInsertResults> | A task representing the asynchronous operation. When complete, the result is an insert result object which contains information on insert errors if any. |
See InsertRowsAsync for an example using an alternative overload.
InsertRowsAsync(String, String, String, BigQueryInsertRow[])
public virtual Task<BigQueryInsertResults> InsertRowsAsync(string projectId, string datasetId, string tableId, params BigQueryInsertRow[] rows)
Inserts all the specified rows into a table. This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to InsertRowsAsync(TableReference, BigQueryInsertRow[]).
Parameters | |
---|---|
Name | Description |
projectId | String The project ID. Must not be null. |
datasetId | String The dataset ID. Must not be null. |
tableId | String The table ID. Must not be null. |
rows | BigQueryInsertRow[] The rows to insert. Must not be null, or contain null elements. |
Returns | |
---|---|
Type | Description |
Task<BigQueryInsertResults> | A task representing the asynchronous operation. When complete, the result is an insert result object which contains information on insert errors if any. |
Options and cancellation tokens are not supported on this call due to restrictions with methods containing a parameter array and optional parameters. To specify options, create a collection or array explicitly, and call InsertRowsAsync(String, String, String, IEnumerable<BigQueryInsertRow>, InsertOptions, CancellationToken).
See InsertRowsAsync for an example using an alternative overload.
InsertRowsAsync(String, String, String, IEnumerable<BigQueryInsertRow>, InsertOptions, CancellationToken)
public virtual Task<BigQueryInsertResults> InsertRowsAsync(string projectId, string datasetId, string tableId, IEnumerable<BigQueryInsertRow> rows, InsertOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously inserts all the given rows of data into the specified table. This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to InsertRowsAsync(TableReference, IEnumerable<BigQueryInsertRow>, InsertOptions, CancellationToken).
Parameters | |
---|---|
Name | Description |
projectId | String The project ID. Must not be null. |
datasetId | String The dataset ID. Must not be null. |
tableId | String The table ID. Must not be null. |
rows | IEnumerable<BigQueryInsertRow> The data to insert. Must not be null, or contain null entries. |
options | InsertOptions 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<BigQueryInsertResults> | A task representing the asynchronous operation. When complete, the result is an insert result object which contains information on insert errors if any. |
See InsertRowsAsync for an example using an alternative overload.
ListDatasets(ProjectReference, ListDatasetsOptions)
public virtual PagedEnumerable<DatasetList, BigQueryDataset> ListDatasets(ProjectReference projectReference, ListDatasetsOptions options = null)
Lists the datasets within the specified project.
Parameters | |
---|---|
Name | Description |
projectReference | Google.Apis.Bigquery.v2.Data.ProjectReference A fully-qualified identifier for the project. Must not be null. |
options | ListDatasetsOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<Google.Apis.Bigquery.v2.Data.DatasetList, BigQueryDataset> | A sequence of datasets within the specified project. |
No network requests are made until the returned sequence is enumerated. This means that any exception due to an invalid request will be deferred until that time. Callers should be prepared for exceptions to be thrown while enumerating the results. In addition to failures due to invalid requests, network or service failures can cause exceptions even after the first results have been returned.
See ListDatasets for an example using an alternative overload.
ListDatasets(ListDatasetsOptions)
public virtual PagedEnumerable<DatasetList, BigQueryDataset> ListDatasets(ListDatasetsOptions options = null)
Lists the datasets within this client's project. This method just creates a Google.Apis.Bigquery.v2.Data.ProjectReference and delegates to ListDatasets(ProjectReference, ListDatasetsOptions).
Parameter | |
---|---|
Name | Description |
options | ListDatasetsOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<Google.Apis.Bigquery.v2.Data.DatasetList, BigQueryDataset> | A sequence of datasets within this project. |
No network requests are made until the returned sequence is enumerated. This means that any exception due to an invalid request will be deferred until that time. Callers should be prepared for exceptions to be thrown while enumerating the results. In addition to failures due to invalid requests, network or service failures can cause exceptions even after the first results have been returned.
BigQueryClient client = BigQueryClient.Create(projectId);
List<BigQueryDataset> datasets = client.ListDatasets().Take(20).ToList();
foreach (BigQueryDataset dataset in datasets)
{
Console.WriteLine(dataset.FullyQualifiedId);
}
ListDatasets(String, ListDatasetsOptions)
public virtual PagedEnumerable<DatasetList, BigQueryDataset> ListDatasets(string projectId, ListDatasetsOptions options = null)
Lists the datasets within the specified project. This method just creates a Google.Apis.Bigquery.v2.Data.ProjectReference and delegates to ListDatasets(ProjectReference, ListDatasetsOptions).
Parameters | |
---|---|
Name | Description |
projectId | String The project to list the datasets from. Must not be null. |
options | ListDatasetsOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<Google.Apis.Bigquery.v2.Data.DatasetList, BigQueryDataset> | A sequence of datasets within the specified project. |
No network requests are made until the returned sequence is enumerated. This means that any exception due to an invalid request will be deferred until that time. Callers should be prepared for exceptions to be thrown while enumerating the results. In addition to failures due to invalid requests, network or service failures can cause exceptions even after the first results have been returned.
See ListDatasets for an example using an alternative overload.
ListDatasetsAsync(ProjectReference, ListDatasetsOptions)
public virtual PagedAsyncEnumerable<DatasetList, BigQueryDataset> ListDatasetsAsync(ProjectReference projectReference, ListDatasetsOptions options = null)
Asynchronously lists the datasets within the specified project.
Parameters | |
---|---|
Name | Description |
projectReference | Google.Apis.Bigquery.v2.Data.ProjectReference A fully-qualified identifier for the project. Must not be null. |
options | ListDatasetsOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<Google.Apis.Bigquery.v2.Data.DatasetList, BigQueryDataset> | An asynchronous sequence of datasets within the specified project. |
No network requests are made until the returned sequence is enumerated. This means that any exception due to an invalid request will be deferred until that time. Callers should be prepared for exceptions to be thrown while enumerating the results. In addition to failures due to invalid requests, network or service failures can cause exceptions even after the first results have been returned.
See ListDatasetsAsync for an example using an alternative overload.
ListDatasetsAsync(ListDatasetsOptions)
public virtual PagedAsyncEnumerable<DatasetList, BigQueryDataset> ListDatasetsAsync(ListDatasetsOptions options = null)
Asynchronously lists the datasets within this client's project. This method just creates a Google.Apis.Bigquery.v2.Data.ProjectReference and delegates to ListDatasetsAsync(ProjectReference, ListDatasetsOptions).
Parameter | |
---|---|
Name | Description |
options | ListDatasetsOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<Google.Apis.Bigquery.v2.Data.DatasetList, BigQueryDataset> | An asynchronous sequence of datasets within this project. |
No network requests are made until the returned sequence is enumerated. This means that any exception due to an invalid request will be deferred until that time. Callers should be prepared for exceptions to be thrown while enumerating the results. In addition to failures due to invalid requests, network or service failures can cause exceptions even after the first results have been returned.
BigQueryClient client = await BigQueryClient.CreateAsync(projectId);
List<BigQueryDataset> datasets = await client.ListDatasetsAsync().Take(20).ToListAsync();
foreach (BigQueryDataset dataset in datasets)
{
Console.WriteLine(dataset.FullyQualifiedId);
}
ListDatasetsAsync(String, ListDatasetsOptions)
public virtual PagedAsyncEnumerable<DatasetList, BigQueryDataset> ListDatasetsAsync(string projectId, ListDatasetsOptions options = null)
Asynchronously lists the datasets within the specified project. This method just creates a Google.Apis.Bigquery.v2.Data.ProjectReference and delegates to ListDatasetsAsync(ProjectReference, ListDatasetsOptions).
Parameters | |
---|---|
Name | Description |
projectId | String The project to list the datasets from. Must not be null. |
options | ListDatasetsOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<Google.Apis.Bigquery.v2.Data.DatasetList, BigQueryDataset> | An asynchronous sequence of datasets within the specified project. |
No network requests are made until the returned sequence is enumerated. This means that any exception due to an invalid request will be deferred until that time. Callers should be prepared for exceptions to be thrown while enumerating the results. In addition to failures due to invalid requests, network or service failures can cause exceptions even after the first results have been returned.
See ListDatasetsAsync for an example using an alternative overload.
ListJobs(ProjectReference, ListJobsOptions)
public virtual PagedEnumerable<JobList, BigQueryJob> ListJobs(ProjectReference projectReference, ListJobsOptions options = null)
Lists the jobs within the specified project.
Parameters | |
---|---|
Name | Description |
projectReference | Google.Apis.Bigquery.v2.Data.ProjectReference A fully-qualified identifier for the project. Must not be null. |
options | ListJobsOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<Google.Apis.Bigquery.v2.Data.JobList, BigQueryJob> | A sequence of the jobs within the specified project. |
No network requests are made until the returned sequence is enumerated. This means that any exception due to an invalid request will be deferred until that time. Callers should be prepared for exceptions to be thrown while enumerating the results. In addition to failures due to invalid requests, network or service failures can cause exceptions even after the first results have been returned.
See ListJobs for an example using an alternative overload.
ListJobs(ListJobsOptions)
public virtual PagedEnumerable<JobList, BigQueryJob> ListJobs(ListJobsOptions options = null)
Lists the jobs within this client's project. This method just creates a Google.Apis.Bigquery.v2.Data.ProjectReference and delegates to ListJobs(ProjectReference, ListJobsOptions).
Parameter | |
---|---|
Name | Description |
options | ListJobsOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<Google.Apis.Bigquery.v2.Data.JobList, BigQueryJob> | A sequence of the jobs within this project. |
No network requests are made until the returned sequence is enumerated. This means that any exception due to an invalid request will be deferred until that time. Callers should be prepared for exceptions to be thrown while enumerating the results. In addition to failures due to invalid requests, network or service failures can cause exceptions even after the first results have been returned.
BigQueryClient client = BigQueryClient.Create(projectId);
List<BigQueryJob> jobs = client.ListJobs().Take(20).ToList();
foreach (BigQueryJob job in jobs)
{
Console.WriteLine(job.Reference.JobId);
}
ListJobs(String, ListJobsOptions)
public virtual PagedEnumerable<JobList, BigQueryJob> ListJobs(string projectId, ListJobsOptions options = null)
Lists the jobs within the specified project. This method just creates a Google.Apis.Bigquery.v2.Data.ProjectReference and delegates to ListJobs(ProjectReference, ListJobsOptions).
Parameters | |
---|---|
Name | Description |
projectId | String The project to list the jobs from. Must not be null. |
options | ListJobsOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<Google.Apis.Bigquery.v2.Data.JobList, BigQueryJob> | A sequence of the jobs within the specified project. |
No network requests are made until the returned sequence is enumerated. This means that any exception due to an invalid request will be deferred until that time. Callers should be prepared for exceptions to be thrown while enumerating the results. In addition to failures due to invalid requests, network or service failures can cause exceptions even after the first results have been returned.
See ListJobs for an example using an alternative overload.
ListJobsAsync(ProjectReference, ListJobsOptions)
public virtual PagedAsyncEnumerable<JobList, BigQueryJob> ListJobsAsync(ProjectReference projectReference, ListJobsOptions options = null)
Asynchronously lists the jobs within the specified project.
Parameters | |
---|---|
Name | Description |
projectReference | Google.Apis.Bigquery.v2.Data.ProjectReference A fully-qualified identifier for the project. Must not be null. |
options | ListJobsOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<Google.Apis.Bigquery.v2.Data.JobList, BigQueryJob> | An asynchronous sequence of the jobs within the specified project. |
No network requests are made until the returned sequence is enumerated. This means that any exception due to an invalid request will be deferred until that time. Callers should be prepared for exceptions to be thrown while enumerating the results. In addition to failures due to invalid requests, network or service failures can cause exceptions even after the first results have been returned.
See ListJobs for an example using an alternative overload.
ListJobsAsync(ListJobsOptions)
public virtual PagedAsyncEnumerable<JobList, BigQueryJob> ListJobsAsync(ListJobsOptions options = null)
Asynchronously lists the jobs within this client's project. This method just creates a Google.Apis.Bigquery.v2.Data.ProjectReference and delegates to ListJobsAsync(ProjectReference, ListJobsOptions).
Parameter | |
---|---|
Name | Description |
options | ListJobsOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<Google.Apis.Bigquery.v2.Data.JobList, BigQueryJob> | An asynchronous sequence of the jobs within this project. |
No network requests are made until the returned sequence is enumerated. This means that any exception due to an invalid request will be deferred until that time. Callers should be prepared for exceptions to be thrown while enumerating the results. In addition to failures due to invalid requests, network or service failures can cause exceptions even after the first results have been returned.
BigQueryClient client = await BigQueryClient.CreateAsync(projectId);
List<BigQueryJob> jobs = await client.ListJobsAsync().Take(20).ToListAsync();
foreach (BigQueryJob job in jobs)
{
Console.WriteLine(job.Reference.JobId);
}
ListJobsAsync(String, ListJobsOptions)
public virtual PagedAsyncEnumerable<JobList, BigQueryJob> ListJobsAsync(string projectId, ListJobsOptions options = null)
Asynchronously lists the jobs within the specified project. This method just creates a Google.Apis.Bigquery.v2.Data.ProjectReference and delegates to ListJobsAsync(ProjectReference, ListJobsOptions).
Parameters | |
---|---|
Name | Description |
projectId | String The project to list the jobs from. Must not be null. |
options | ListJobsOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<Google.Apis.Bigquery.v2.Data.JobList, BigQueryJob> | An asynchronous sequence of the jobs within the specified project. |
No network requests are made until the returned sequence is enumerated. This means that any exception due to an invalid request will be deferred until that time. Callers should be prepared for exceptions to be thrown while enumerating the results. In addition to failures due to invalid requests, network or service failures can cause exceptions even after the first results have been returned.
See ListJobs for an example using an alternative overload.
ListModels(DatasetReference, ListModelsOptions)
public virtual PagedEnumerable<ListModelsResponse, BigQueryModel> ListModels(DatasetReference datasetReference, ListModelsOptions options = null)
Lists the models in a dataset.
Parameters | |
---|---|
Name | Description |
datasetReference | Google.Apis.Bigquery.v2.Data.DatasetReference A fully-qualified identifier for the dataset. Must not be null. |
options | ListModelsOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<Google.Apis.Bigquery.v2.Data.ListModelsResponse, BigQueryModel> | A sequence of models within the dataset. |
The returned models will not have all the properties in the resource populated. For complete information, make a GetModel call for each model you need the details of.
No network requests are made until the returned sequence is enumerated. This means that any exception due to an invalid request will be deferred until that time. Callers should be prepared for exceptions to be thrown while enumerating the results. In addition to failures due to invalid requests, network or service failures can cause exceptions even after the first results have been returned.
ListModels(String, ListModelsOptions)
public virtual PagedEnumerable<ListModelsResponse, BigQueryModel> ListModels(string datasetId, ListModelsOptions options = null)
Lists the models in a dataset specified by dataset ID, where the dataset is in this client's project. This method just creates a Google.Apis.Bigquery.v2.Data.DatasetReference and delegates to ListModels(DatasetReference, ListModelsOptions).
Parameters | |
---|---|
Name | Description |
datasetId | String The ID of the dataset to list models from. Must not be null. |
options | ListModelsOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<Google.Apis.Bigquery.v2.Data.ListModelsResponse, BigQueryModel> | A sequence of models within the dataset. |
The returned models will not have all the properties in the resource populated. For complete information, make a GetModel call for each model you need the details of.
No network requests are made until the returned sequence is enumerated. This means that any exception due to an invalid request will be deferred until that time. Callers should be prepared for exceptions to be thrown while enumerating the results. In addition to failures due to invalid requests, network or service failures can cause exceptions even after the first results have been returned.
ListModels(String, String, ListModelsOptions)
public virtual PagedEnumerable<ListModelsResponse, BigQueryModel> ListModels(string projectId, string datasetId, ListModelsOptions options = null)
Lists the models in a dataset specified by project ID and dataset ID. This method just creates a Google.Apis.Bigquery.v2.Data.DatasetReference and delegates to ListModels(DatasetReference, ListModelsOptions).
Parameters | |
---|---|
Name | Description |
projectId | String The ID of the project containing the dataset. Must not be null. |
datasetId | String The ID of the dataset to list models from. Must not be null. |
options | ListModelsOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<Google.Apis.Bigquery.v2.Data.ListModelsResponse, BigQueryModel> | A sequence of models within the dataset. |
The returned models will not have all the properties in the resource populated. For complete information, make a GetModel call for each model you need the details of.
No network requests are made until the returned sequence is enumerated. This means that any exception due to an invalid request will be deferred until that time. Callers should be prepared for exceptions to be thrown while enumerating the results. In addition to failures due to invalid requests, network or service failures can cause exceptions even after the first results have been returned.
ListModelsAsync(DatasetReference, ListModelsOptions)
public virtual PagedAsyncEnumerable<ListModelsResponse, BigQueryModel> ListModelsAsync(DatasetReference datasetReference, ListModelsOptions options = null)
Lists the models in a dataset.
Parameters | |
---|---|
Name | Description |
datasetReference | Google.Apis.Bigquery.v2.Data.DatasetReference A fully-qualified identifier for the dataset. Must not be null. |
options | ListModelsOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<Google.Apis.Bigquery.v2.Data.ListModelsResponse, BigQueryModel> | A sequence of models within the dataset. |
The returned models will not have all the properties in the resource populated. For complete information, make a GetModel call for each model you need the details of.
No network requests are made until the returned sequence is enumerated. This means that any exception due to an invalid request will be deferred until that time. Callers should be prepared for exceptions to be thrown while enumerating the results. In addition to failures due to invalid requests, network or service failures can cause exceptions even after the first results have been returned.
ListModelsAsync(String, ListModelsOptions)
public virtual PagedAsyncEnumerable<ListModelsResponse, BigQueryModel> ListModelsAsync(string datasetId, ListModelsOptions options = null)
Lists the models in a dataset specified by dataset ID, where the dataset is in this client's project. This method just creates a Google.Apis.Bigquery.v2.Data.DatasetReference and delegates to ListModelsAsync(DatasetReference, ListModelsOptions).
Parameters | |
---|---|
Name | Description |
datasetId | String The ID of the dataset to list models from. Must not be null. |
options | ListModelsOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<Google.Apis.Bigquery.v2.Data.ListModelsResponse, BigQueryModel> | An asynchronous sequence of models within the dataset. |
The returned models will not have all the properties in the resource populated. For complete information, make a GetModel call for each model you need the details of.
No network requests are made until the returned sequence is enumerated. This means that any exception due to an invalid request will be deferred until that time. Callers should be prepared for exceptions to be thrown while enumerating the results. In addition to failures due to invalid requests, network or service failures can cause exceptions even after the first results have been returned.
ListModelsAsync(String, String, ListModelsOptions)
public virtual PagedAsyncEnumerable<ListModelsResponse, BigQueryModel> ListModelsAsync(string projectId, string datasetId, ListModelsOptions options = null)
Lists the models in a dataset specified by project ID and dataset ID. This method just creates a Google.Apis.Bigquery.v2.Data.DatasetReference and delegates to ListModelsAsync(DatasetReference, ListModelsOptions).
Parameters | |
---|---|
Name | Description |
projectId | String The ID of the project containing the dataset. Must not be null. |
datasetId | String The ID of the dataset to list models from. Must not be null. |
options | ListModelsOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<Google.Apis.Bigquery.v2.Data.ListModelsResponse, BigQueryModel> | An asynchronous sequence of models within the dataset. |
The returned models will not have all the properties in the resource populated. For complete information, make a GetModel call for each model you need the details of.
No network requests are made until the returned sequence is enumerated. This means that any exception due to an invalid request will be deferred until that time. Callers should be prepared for exceptions to be thrown while enumerating the results. In addition to failures due to invalid requests, network or service failures can cause exceptions even after the first results have been returned.
ListProjects(ListProjectsOptions)
public virtual PagedEnumerable<ProjectList, CloudProject> ListProjects(ListProjectsOptions options = null)
Lists the cloud projects available using the current credentials.
Parameter | |
---|---|
Name | Description |
options | ListProjectsOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<Google.Apis.Bigquery.v2.Data.ProjectList, CloudProject> | A sequence of projects the user has access to. |
The project associated with this client is irrelevant for this operation.
No network requests are made until the returned sequence is enumerated. This means that any exception due to an invalid request will be deferred until that time. Callers should be prepared for exceptions to be thrown while enumerating the results. In addition to failures due to invalid requests, network or service failures can cause exceptions even after the first results have been returned.
BigQueryClient client = BigQueryClient.Create("irrelevant");
PagedEnumerable<ProjectList, CloudProject> projects = client.ListProjects();
foreach (CloudProject project in projects)
{
Console.WriteLine($"{project.ProjectId}: {project.FriendlyName}");
}
ListProjectsAsync(ListProjectsOptions)
public virtual PagedAsyncEnumerable<ProjectList, CloudProject> ListProjectsAsync(ListProjectsOptions options = null)
Asynchronously lists the cloud projects available using the current credentials.
Parameter | |
---|---|
Name | Description |
options | ListProjectsOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<Google.Apis.Bigquery.v2.Data.ProjectList, CloudProject> | An asynchronous sequence of projects the user has access to. |
The project associated with this client is irrelevant for this operation.
No network requests are made until the returned sequence is enumerated. This means that any exception due to an invalid request will be deferred until that time. Callers should be prepared for exceptions to be thrown while enumerating the results. In addition to failures due to invalid requests, network or service failures can cause exceptions even after the first results have been returned.
BigQueryClient client = BigQueryClient.Create("irrelevant");
PagedAsyncEnumerable<ProjectList, CloudProject> projects = client.ListProjectsAsync();
await projects.ForEachAsync(project =>
{
Console.WriteLine($"{project.ProjectId}: {project.FriendlyName}");
});
ListRoutines(DatasetReference, ListRoutinesOptions)
public virtual PagedEnumerable<ListRoutinesResponse, BigQueryRoutine> ListRoutines(DatasetReference datasetReference, ListRoutinesOptions options = null)
Lists the routines in a dataset.
Parameters | |
---|---|
Name | Description |
datasetReference | Google.Apis.Bigquery.v2.Data.DatasetReference A fully-qualified identifier for the dataset. Must not be null. |
options | ListRoutinesOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<Google.Apis.Bigquery.v2.Data.ListRoutinesResponse, BigQueryRoutine> | A sequence of tables within the dataset. |
The returned routines will contain populated properties as specified by ReadMask or the default ones. ReadMask for more information.
No network requests are made until the returned sequence is enumerated. This means that any exception due to an invalid request will be deferred until that time. Callers should be prepared for exceptions to be thrown while enumerating the results. In addition to failures due to invalid requests, network or service failures can cause exceptions even after the first results have been returned.
ListRoutines(String, ListRoutinesOptions)
public virtual PagedEnumerable<ListRoutinesResponse, BigQueryRoutine> ListRoutines(string datasetId, ListRoutinesOptions options = null)
Lists the routines in a dataset specified by dataset ID, where the dataset is in this client's project. This method just creates a Google.Apis.Bigquery.v2.Data.DatasetReference and delegates to ListRoutines(DatasetReference, ListRoutinesOptions).
Parameters | |
---|---|
Name | Description |
datasetId | String The ID of the dataset to list routines from. Must not be null. |
options | ListRoutinesOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<Google.Apis.Bigquery.v2.Data.ListRoutinesResponse, BigQueryRoutine> | A sequence of routines within the dataset. |
The returned routines will contain populated properties as specified by ReadMask or the default ones. ReadMask for more information.
No network requests are made until the returned sequence is enumerated. This means that any exception due to an invalid request will be deferred until that time. Callers should be prepared for exceptions to be thrown while enumerating the results. In addition to failures due to invalid requests, network or service failures can cause exceptions even after the first results have been returned.
ListRoutines(String, String, ListRoutinesOptions)
public virtual PagedEnumerable<ListRoutinesResponse, BigQueryRoutine> ListRoutines(string projectId, string datasetId, ListRoutinesOptions options = null)
Lists the routines in a dataset specified by project ID and dataset ID. This method just creates a Google.Apis.Bigquery.v2.Data.DatasetReference and delegates to ListRoutines(DatasetReference, ListRoutinesOptions).
Parameters | |
---|---|
Name | Description |
projectId | String The ID of the project containing the dataset. Must not be null. |
datasetId | String The ID of the dataset to list routines from. Must not be null. |
options | ListRoutinesOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<Google.Apis.Bigquery.v2.Data.ListRoutinesResponse, BigQueryRoutine> | A sequence of routines within the dataset. |
The returned routines will contain populated properties as specified by ReadMask or the default ones. ReadMask for more information.
No network requests are made until the returned sequence is enumerated. This means that any exception due to an invalid request will be deferred until that time. Callers should be prepared for exceptions to be thrown while enumerating the results. In addition to failures due to invalid requests, network or service failures can cause exceptions even after the first results have been returned.
ListRoutinesAsync(DatasetReference, ListRoutinesOptions)
public virtual PagedAsyncEnumerable<ListRoutinesResponse, BigQueryRoutine> ListRoutinesAsync(DatasetReference datasetReference, ListRoutinesOptions options = null)
Lists the routines in a dataset.
Parameters | |
---|---|
Name | Description |
datasetReference | Google.Apis.Bigquery.v2.Data.DatasetReference A fully-qualified identifier for the dataset. Must not be null. |
options | ListRoutinesOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<Google.Apis.Bigquery.v2.Data.ListRoutinesResponse, BigQueryRoutine> | A sequence of routines within the dataset. |
The returned routines will contain populated properties as specified by ReadMask or the default ones. ReadMask for more information.
No network requests are made until the returned sequence is enumerated. This means that any exception due to an invalid request will be deferred until that time. Callers should be prepared for exceptions to be thrown while enumerating the results. In addition to failures due to invalid requests, network or service failures can cause exceptions even after the first results have been returned.
ListRoutinesAsync(String, ListRoutinesOptions)
public virtual PagedAsyncEnumerable<ListRoutinesResponse, BigQueryRoutine> ListRoutinesAsync(string datasetId, ListRoutinesOptions options = null)
Lists the routines in a dataset specified by dataset ID, where the dataset is in this client's project. This method just creates a Google.Apis.Bigquery.v2.Data.DatasetReference and delegates to ListRoutinesAsync(DatasetReference, ListRoutinesOptions).
Parameters | |
---|---|
Name | Description |
datasetId | String The ID of the dataset to list routines from. Must not be null. |
options | ListRoutinesOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<Google.Apis.Bigquery.v2.Data.ListRoutinesResponse, BigQueryRoutine> | An asynchronous sequence of routines within the dataset. |
The returned routines will contain populated properties as specified by ReadMask or the default ones. ReadMask for more information.
No network requests are made until the returned sequence is enumerated. This means that any exception due to an invalid request will be deferred until that time. Callers should be prepared for exceptions to be thrown while enumerating the results. In addition to failures due to invalid requests, network or service failures can cause exceptions even after the first results have been returned.
ListRoutinesAsync(String, String, ListRoutinesOptions)
public virtual PagedAsyncEnumerable<ListRoutinesResponse, BigQueryRoutine> ListRoutinesAsync(string projectId, string datasetId, ListRoutinesOptions options = null)
Lists the routines in a dataset specified by project ID and dataset ID. This method just creates a Google.Apis.Bigquery.v2.Data.DatasetReference and delegates to ListRoutinesAsync(DatasetReference, ListRoutinesOptions).
Parameters | |
---|---|
Name | Description |
projectId | String The ID of the project containing the dataset. Must not be null. |
datasetId | String The ID of the dataset to list routines from. Must not be null. |
options | ListRoutinesOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<Google.Apis.Bigquery.v2.Data.ListRoutinesResponse, BigQueryRoutine> | An asynchronous sequence of routines within the dataset. |
The returned routines will contain populated properties as specified by ReadMask or the default ones. ReadMask for more information.
No network requests are made until the returned sequence is enumerated. This means that any exception due to an invalid request will be deferred until that time. Callers should be prepared for exceptions to be thrown while enumerating the results. In addition to failures due to invalid requests, network or service failures can cause exceptions even after the first results have been returned.
ListRows(TableReference, TableSchema, ListRowsOptions)
public virtual PagedEnumerable<TableDataList, BigQueryRow> ListRows(TableReference tableReference, TableSchema schema = null, ListRowsOptions options = null)
Lists the rows within a table, similar to a SELECT * FROM ...
query.
Parameters | |
---|---|
Name | Description |
tableReference | Google.Apis.Bigquery.v2.Data.TableReference A fully-qualified identifier for the table. Must not be null. |
schema | Google.Apis.Bigquery.v2.Data.TableSchema The schema to use when interpreting results. If this is a partial schema, then partial rows will be fetched. See SelectedFields for how to obtain a table's partial schema. This may be null or empty (i.e. Google.Apis.Bigquery.v2.Data.TableSchema.Fields null or empty), in which case it will be fetched from the table first. |
options | ListRowsOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<Google.Apis.Bigquery.v2.Data.TableDataList, BigQueryRow> | The results of listing the rows within the table. |
No network requests are made until the returned sequence is enumerated. This means that any exception due to an invalid request will be deferred until that time. Callers should be prepared for exceptions to be thrown while enumerating the results. In addition to failures due to invalid requests, network or service failures can cause exceptions even after the first results have been returned.
See ListRows for an example using an alternative overload.
ListRows(String, String, TableSchema, ListRowsOptions)
public virtual PagedEnumerable<TableDataList, BigQueryRow> ListRows(string datasetId, string tableId, TableSchema schema = null, ListRowsOptions options = null)
Lists the rows within a table within this client's project specified by dataset ID and table ID, similar to a SELECT * FROM ...
query.
This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to ListRows(TableReference, TableSchema, ListRowsOptions).
Parameters | |
---|---|
Name | Description |
datasetId | String The dataset ID. Must not be null. |
tableId | String The table ID. Must not be null. |
schema | Google.Apis.Bigquery.v2.Data.TableSchema The schema to use when interpreting results. If this is a partial schema, then partial rows will be fetched. See SelectedFields for how to obtain a table's partial schema. This may be null or empty (i.e. Google.Apis.Bigquery.v2.Data.TableSchema.Fields null or empty), in which case it will be fetched from the table first. |
options | ListRowsOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<Google.Apis.Bigquery.v2.Data.TableDataList, BigQueryRow> | The results of listing the rows within the table. |
No network requests are made until the returned sequence is enumerated. This means that any exception due to an invalid request will be deferred until that time. Callers should be prepared for exceptions to be thrown while enumerating the results. In addition to failures due to invalid requests, network or service failures can cause exceptions even after the first results have been returned.
BigQueryClient client = BigQueryClient.Create(projectId);
PagedEnumerable<TableDataList, BigQueryRow> result = client.ListRows(datasetId, tableId);
foreach (BigQueryRow row in result)
{
DateTime timestamp = (DateTime) row["game_started"];
long level = (long) row["level"];
long score = (long) row["score"];
string player = (string) row["player"];
Console.WriteLine($"{player}: {level}/{score} ({timestamp:yyyy-MM-dd HH:mm:ss})");
}
ListRows(String, String, String, TableSchema, ListRowsOptions)
public virtual PagedEnumerable<TableDataList, BigQueryRow> ListRows(string projectId, string datasetId, string tableId, TableSchema schema = null, ListRowsOptions options = null)
Lists the rows within a table specified by project ID, dataset ID and table ID, similar to a SELECT * FROM ...
query.
This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to ListRows(TableReference, TableSchema, ListRowsOptions).
Parameters | |
---|---|
Name | Description |
projectId | String The project ID. Must not be null. |
datasetId | String The dataset ID. Must not be null. |
tableId | String The table ID. Must not be null. |
schema | Google.Apis.Bigquery.v2.Data.TableSchema The schema to use when interpreting results. This may be null, in which case it will be fetched from the table first. |
options | ListRowsOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<Google.Apis.Bigquery.v2.Data.TableDataList, BigQueryRow> | The results of listing the rows within the table. |
No network requests are made until the returned sequence is enumerated. This means that any exception due to an invalid request will be deferred until that time. Callers should be prepared for exceptions to be thrown while enumerating the results. In addition to failures due to invalid requests, network or service failures can cause exceptions even after the first results have been returned.
See ListRows for an example using an alternative overload.
ListRowsAsync(TableReference, TableSchema, ListRowsOptions)
public virtual PagedAsyncEnumerable<TableDataList, BigQueryRow> ListRowsAsync(TableReference tableReference, TableSchema schema = null, ListRowsOptions options = null)
Lists the rows within a table, similar to a SELECT * FROM ...
query.
Parameters | |
---|---|
Name | Description |
tableReference | Google.Apis.Bigquery.v2.Data.TableReference A fully-qualified identifier for the table. Must not be null. |
schema | Google.Apis.Bigquery.v2.Data.TableSchema The schema to use when interpreting results. This may be null, in which case it will be fetched from the table first. |
options | ListRowsOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<Google.Apis.Bigquery.v2.Data.TableDataList, BigQueryRow> | An asynchronous sequence of the rows within the table. |
No network requests are made until the returned sequence is enumerated. This means that any exception due to an invalid request will be deferred until that time. Callers should be prepared for exceptions to be thrown while enumerating the results. In addition to failures due to invalid requests, network or service failures can cause exceptions even after the first results have been returned.
See ListRowsAsync for an example using an alternative overload.
ListRowsAsync(String, String, TableSchema, ListRowsOptions)
public virtual PagedAsyncEnumerable<TableDataList, BigQueryRow> ListRowsAsync(string datasetId, string tableId, TableSchema schema = null, ListRowsOptions options = null)
Lists the rows within a table within this client's project specified by dataset ID and table ID, similar to a SELECT * FROM ...
query.
This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to ListRowsAsync(TableReference, TableSchema, ListRowsOptions).
Parameters | |
---|---|
Name | Description |
datasetId | String The dataset ID. Must not be null. |
tableId | String The table ID. Must not be null. |
schema | Google.Apis.Bigquery.v2.Data.TableSchema The schema to use when interpreting results. This may be null, in which case it will be fetched from the table first. |
options | ListRowsOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<Google.Apis.Bigquery.v2.Data.TableDataList, BigQueryRow> | An asynchronous sequence of the rows within the table. |
No network requests are made until the returned sequence is enumerated. This means that any exception due to an invalid request will be deferred until that time. Callers should be prepared for exceptions to be thrown while enumerating the results. In addition to failures due to invalid requests, network or service failures can cause exceptions even after the first results have been returned.
BigQueryClient client = await BigQueryClient.CreateAsync(projectId);
PagedAsyncEnumerable<TableDataList, BigQueryRow> result = client.ListRowsAsync(datasetId, tableId);
await result.ForEachAsync(row =>
{
DateTime timestamp = (DateTime) row["game_started"];
long level = (long) row["level"];
long score = (long) row["score"];
string player = (string) row["player"];
Console.WriteLine($"{player}: {level}/{score} ({timestamp:yyyy-MM-dd HH:mm:ss})");
});
ListRowsAsync(String, String, String, TableSchema, ListRowsOptions)
public virtual PagedAsyncEnumerable<TableDataList, BigQueryRow> ListRowsAsync(string projectId, string datasetId, string tableId, TableSchema schema = null, ListRowsOptions options = null)
Lists the rows within a table specified by project ID, dataset ID and table ID, similar to a SELECT * FROM ...
query.
This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to ListRowsAsync(TableReference, TableSchema, ListRowsOptions).
Parameters | |
---|---|
Name | Description |
projectId | String The project ID. Must not be null. |
datasetId | String The dataset ID. Must not be null. |
tableId | String The table ID. Must not be null. |
schema | Google.Apis.Bigquery.v2.Data.TableSchema The schema to use when interpreting results. This may be null, in which case it will be fetched from the table first. |
options | ListRowsOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<Google.Apis.Bigquery.v2.Data.TableDataList, BigQueryRow> | An asynchronous sequence of the rows within the table. |
No network requests are made until the returned sequence is enumerated. This means that any exception due to an invalid request will be deferred until that time. Callers should be prepared for exceptions to be thrown while enumerating the results. In addition to failures due to invalid requests, network or service failures can cause exceptions even after the first results have been returned.
See ListRowsAsync for an example using an alternative overload.
ListTables(DatasetReference, ListTablesOptions)
public virtual PagedEnumerable<TableList, BigQueryTable> ListTables(DatasetReference datasetReference, ListTablesOptions options = null)
Lists the tables in a dataset.
Parameters | |
---|---|
Name | Description |
datasetReference | Google.Apis.Bigquery.v2.Data.DatasetReference A fully-qualified identifier for the dataset. Must not be null. |
options | ListTablesOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<Google.Apis.Bigquery.v2.Data.TableList, BigQueryTable> | A sequence of tables within the dataset. |
The returned tables will not have all the properties in the resource populated. For complete information, make a GetTable call for each table you need the details of.
No network requests are made until the returned sequence is enumerated. This means that any exception due to an invalid request will be deferred until that time. Callers should be prepared for exceptions to be thrown while enumerating the results. In addition to failures due to invalid requests, network or service failures can cause exceptions even after the first results have been returned.
See ListTables for an example using an alternative overload.
ListTables(String, ListTablesOptions)
public virtual PagedEnumerable<TableList, BigQueryTable> ListTables(string datasetId, ListTablesOptions options = null)
Lists the tables in a dataset specified by dataset ID, where the dataset is in this client's project. This method just creates a Google.Apis.Bigquery.v2.Data.DatasetReference and delegates to ListTables(DatasetReference, ListTablesOptions).
Parameters | |
---|---|
Name | Description |
datasetId | String The ID of the dataset to list tables from. Must not be null. |
options | ListTablesOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<Google.Apis.Bigquery.v2.Data.TableList, BigQueryTable> | A sequence of tables within the dataset. |
The returned tables will not have all the properties in the resource populated. For complete information, make a GetTable call for each table you need the details of.
No network requests are made until the returned sequence is enumerated. This means that any exception due to an invalid request will be deferred until that time. Callers should be prepared for exceptions to be thrown while enumerating the results. In addition to failures due to invalid requests, network or service failures can cause exceptions even after the first results have been returned.
BigQueryClient client = BigQueryClient.Create(projectId);
List<BigQueryTable> tables = client.ListTables(datasetId).Take(20).ToList();
foreach (BigQueryTable table in tables)
{
Console.WriteLine(table.FullyQualifiedId);
}
ListTables(String, String, ListTablesOptions)
public virtual PagedEnumerable<TableList, BigQueryTable> ListTables(string projectId, string datasetId, ListTablesOptions options = null)
Lists the tables in a dataset specified by project ID and dataset ID. This method just creates a Google.Apis.Bigquery.v2.Data.DatasetReference and delegates to ListTables(DatasetReference, ListTablesOptions).
Parameters | |
---|---|
Name | Description |
projectId | String The ID of the project containing the dataset. Must not be null. |
datasetId | String The ID of the dataset to list tables from. Must not be null. |
options | ListTablesOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<Google.Apis.Bigquery.v2.Data.TableList, BigQueryTable> | A sequence of tables within the dataset. |
The returned tables will not have all the properties in the resource populated. For complete information, make a GetTable call for each table you need the details of.
No network requests are made until the returned sequence is enumerated. This means that any exception due to an invalid request will be deferred until that time. Callers should be prepared for exceptions to be thrown while enumerating the results. In addition to failures due to invalid requests, network or service failures can cause exceptions even after the first results have been returned.
See ListTables for an example using an alternative overload.
ListTablesAsync(DatasetReference, ListTablesOptions)
public virtual PagedAsyncEnumerable<TableList, BigQueryTable> ListTablesAsync(DatasetReference datasetReference, ListTablesOptions options = null)
Lists the tables in a dataset.
Parameters | |
---|---|
Name | Description |
datasetReference | Google.Apis.Bigquery.v2.Data.DatasetReference A fully-qualified identifier for the dataset. Must not be null. |
options | ListTablesOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<Google.Apis.Bigquery.v2.Data.TableList, BigQueryTable> | A sequence of tables within the dataset. |
The returned tables will not have all the properties in the resource populated. For complete information, make a GetTable call for each table you need the details of.
No network requests are made until the returned sequence is enumerated. This means that any exception due to an invalid request will be deferred until that time. Callers should be prepared for exceptions to be thrown while enumerating the results. In addition to failures due to invalid requests, network or service failures can cause exceptions even after the first results have been returned.
See ListTablesAsync for an example using an alternative overload.
ListTablesAsync(String, ListTablesOptions)
public virtual PagedAsyncEnumerable<TableList, BigQueryTable> ListTablesAsync(string datasetId, ListTablesOptions options = null)
Lists the tables in a dataset specified by dataset ID, where the dataset is in this client's project. This method just creates a Google.Apis.Bigquery.v2.Data.DatasetReference and delegates to ListTablesAsync(DatasetReference, ListTablesOptions).
Parameters | |
---|---|
Name | Description |
datasetId | String The ID of the dataset to list tables from. Must not be null. |
options | ListTablesOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<Google.Apis.Bigquery.v2.Data.TableList, BigQueryTable> | An asynchronous sequence of tables within the dataset. |
The returned tables will not have all the properties in the resource populated. For complete information, make a GetTable call for each table you need the details of.
No network requests are made until the returned sequence is enumerated. This means that any exception due to an invalid request will be deferred until that time. Callers should be prepared for exceptions to be thrown while enumerating the results. In addition to failures due to invalid requests, network or service failures can cause exceptions even after the first results have been returned.
BigQueryClient client = await BigQueryClient.CreateAsync(projectId);
List<BigQueryTable> tables = await client.ListTablesAsync(datasetId).Take(20).ToListAsync();
foreach (BigQueryTable table in tables)
{
Console.WriteLine(table.FullyQualifiedId);
}
ListTablesAsync(String, String, ListTablesOptions)
public virtual PagedAsyncEnumerable<TableList, BigQueryTable> ListTablesAsync(string projectId, string datasetId, ListTablesOptions options = null)
Lists the tables in a dataset specified by project ID and dataset ID. This method just creates a Google.Apis.Bigquery.v2.Data.DatasetReference and delegates to ListTablesAsync(DatasetReference, ListTablesOptions).
Parameters | |
---|---|
Name | Description |
projectId | String The ID of the project containing the dataset. Must not be null. |
datasetId | String The ID of the dataset to list tables from. Must not be null. |
options | ListTablesOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<Google.Apis.Bigquery.v2.Data.TableList, BigQueryTable> | An asynchronous sequence of tables within the dataset. |
The returned tables will not have all the properties in the resource populated. For complete information, make a GetTable call for each table you need the details of.
No network requests are made until the returned sequence is enumerated. This means that any exception due to an invalid request will be deferred until that time. Callers should be prepared for exceptions to be thrown while enumerating the results. In addition to failures due to invalid requests, network or service failures can cause exceptions even after the first results have been returned.
See ListTablesAsync for an example using an alternative overload.
ModifyDatasetLabels(DatasetReference, IDictionary<String, String>, ModifyLabelsOptions)
public virtual IDictionary<string, string> ModifyDatasetLabels(DatasetReference datasetReference, IDictionary<string, string> labels, ModifyLabelsOptions options = null)
Sets or removes one or more labels on the specified dataset.
Parameters | |
---|---|
Name | Description |
datasetReference | Google.Apis.Bigquery.v2.Data.DatasetReference A fully-qualified identifier for the dataset. Must not be null. |
labels | IDictionary<String, String> The labels to set. Must contain at least one entry; keys must not be null, but values may be (indicating label removal). |
options | ModifyLabelsOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
IDictionary<String, String> | A dictionary with the same keys as |
Each entry in labels
is treated as a label to set or remove. If the value is null,
it will be removed from the dataset; otherwise, it will be set/added. Labels which do not have an entry
in the dictionary will be ignored.
See ModifyDatasetLabels for an example using an alternative overload.
ModifyDatasetLabels(String, IDictionary<String, String>, ModifyLabelsOptions)
public virtual IDictionary<string, string> ModifyDatasetLabels(string datasetId, IDictionary<string, string> labels, ModifyLabelsOptions options = null)
Sets or removes one or more labels on the specified dataset within this client's project. This method just creates a Google.Apis.Bigquery.v2.Data.DatasetReference and delegates to ModifyDatasetLabels(DatasetReference, IDictionary<String, String>, ModifyLabelsOptions).
Parameters | |
---|---|
Name | Description |
datasetId | String The dataset ID. Must not be null. |
labels | IDictionary<String, String> The labels to set. Must contain at least one entry; keys must not be null, but values may be (indicating label removal). |
options | ModifyLabelsOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
IDictionary<String, String> | A dictionary with the same keys as |
Each entry in labels
is treated as a label to set or remove. If the value is null,
it will be removed from the dataset; otherwise, it will be set/added. Labels which do not have an entry
in the dictionary will be ignored.
BigQueryClient client = BigQueryClient.Create(projectId);
IDictionary<string, string> modifications = new Dictionary<string, string>
{
{ "set_me", "x" }, // Label "set_me" will be set to value "x"
{ "remove_me", null } // Label "remove_me" will be removed
};
IDictionary<string, string> previousLabels = client.ModifyDatasetLabels(datasetId, modifications);
Console.WriteLine("Previous values for specified labels:");
foreach (KeyValuePair<string, string> label in previousLabels)
{
Console.WriteLine($"Name: {label.Key}; Value: {label.Value}");
}
ModifyDatasetLabels(String, String, IDictionary<String, String>, ModifyLabelsOptions)
public virtual IDictionary<string, string> ModifyDatasetLabels(string projectId, string datasetId, IDictionary<string, string> labels, ModifyLabelsOptions options = null)
Sets or removes one or more labels on the specified dataset. This method just creates a Google.Apis.Bigquery.v2.Data.DatasetReference and delegates to ModifyDatasetLabels(DatasetReference, IDictionary<String, String>, ModifyLabelsOptions).
Parameters | |
---|---|
Name | Description |
projectId | String The project ID. Must not be null. |
datasetId | String The dataset ID. Must not be null. |
labels | IDictionary<String, String> The labels to set. Must contain at least one entry; keys must not be null, but values may be (indicating label removal). |
options | ModifyLabelsOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
IDictionary<String, String> | A dictionary with the same keys as |
Each entry in labels
is treated as a label to set or remove. If the value is null,
it will be removed from the dataset; otherwise, it will be set/added. Labels which do not have an entry
in the dictionary will be ignored.
See ModifyDatasetLabels for an example using an alternative overload.
ModifyDatasetLabelsAsync(DatasetReference, IDictionary<String, String>, ModifyLabelsOptions, CancellationToken)
public virtual Task<IDictionary<string, string>> ModifyDatasetLabelsAsync(DatasetReference datasetReference, IDictionary<string, string> labels, ModifyLabelsOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously sets or removes one or more labels on the specified dataset.
Parameters | |
---|---|
Name | Description |
datasetReference | Google.Apis.Bigquery.v2.Data.DatasetReference A fully-qualified identifier for the dataset. Must not be null. |
labels | IDictionary<String, String> The labels to set. Must contain at least one entry; keys must not be null, but values may be (indicating label removal). |
options | ModifyLabelsOptions 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<IDictionary<String, String>> | A task representing the asynchronous operation. When complete, the result is
a dictionary with the same keys as |
Each entry in labels
is treated as a label to set or remove. If the value is null,
it will be removed from the dataset; otherwise, it will be set/added. Labels which do not have an entry
in the dictionary will be ignored.
See ModifyDatasetLabels for a synchronous example.
ModifyDatasetLabelsAsync(String, IDictionary<String, String>, ModifyLabelsOptions, CancellationToken)
public virtual Task<IDictionary<string, string>> ModifyDatasetLabelsAsync(string datasetId, IDictionary<string, string> labels, ModifyLabelsOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously sets or removes one or more labels on the specified dataset within this client's project. This method just creates a Google.Apis.Bigquery.v2.Data.DatasetReference and delegates to ModifyDatasetLabelsAsync(DatasetReference, IDictionary<String, String>, ModifyLabelsOptions, CancellationToken).
Parameters | |
---|---|
Name | Description |
datasetId | String The dataset ID. Must not be null. |
labels | IDictionary<String, String> The labels to set. Must contain at least one entry; keys must not be null, but values may be (indicating label removal). |
options | ModifyLabelsOptions 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<IDictionary<String, String>> | A task representing the asynchronous operation. When complete, the result is
a dictionary with the same keys as |
Each entry in labels
is treated as a label to set or remove. If the value is null,
it will be removed from the dataset; otherwise, it will be set/added. Labels which do not have an entry
in the dictionary will be ignored.
See ModifyDatasetLabels for a synchronous example.
ModifyDatasetLabelsAsync(String, String, IDictionary<String, String>, ModifyLabelsOptions, CancellationToken)
public virtual Task<IDictionary<string, string>> ModifyDatasetLabelsAsync(string projectId, string datasetId, IDictionary<string, string> labels, ModifyLabelsOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously sets or removes one or more labels on the specified dataset. This method just creates a Google.Apis.Bigquery.v2.Data.DatasetReference and delegates to ModifyDatasetLabelsAsync(DatasetReference, IDictionary<String, String>, ModifyLabelsOptions, CancellationToken).
Parameters | |
---|---|
Name | Description |
projectId | String The project ID. Must not be null. |
datasetId | String The dataset ID. Must not be null. |
labels | IDictionary<String, String> The labels to set. Must contain at least one entry; keys must not be null, but values may be (indicating label removal). |
options | ModifyLabelsOptions 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<IDictionary<String, String>> | A task representing the asynchronous operation. When complete, the result is
a dictionary with the same keys as |
Each entry in labels
is treated as a label to set or remove. If the value is null,
it will be removed from the dataset; otherwise, it will be set/added. Labels which do not have an entry
in the dictionary will be ignored.
See ModifyDatasetLabels for a synchronous example.
PatchDataset(DatasetReference, Dataset, PatchDatasetOptions)
public virtual BigQueryDataset PatchDataset(DatasetReference datasetReference, Dataset resource, PatchDatasetOptions options = null)
Patches the specified dataset with fields in the given resource.
Parameters | |
---|---|
Name | Description |
datasetReference | Google.Apis.Bigquery.v2.Data.DatasetReference A fully-qualified identifier for the dataset. Must not be null. |
resource | Google.Apis.Bigquery.v2.Data.Dataset The dataset resource representation to use for the patch. Only fields present in the resource will be updated. |
options | PatchDatasetOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
BigQueryDataset | The updated dataset. |
If the resource contains an ETag, it is used for optimistic concurrency validation.
See PatchDataset for an example using an alternative overload.
PatchDataset(String, Dataset, PatchDatasetOptions)
public virtual BigQueryDataset PatchDataset(string datasetId, Dataset resource, PatchDatasetOptions options = null)
Patches the specified dataset within this client's project with fields in the given resource. This method just creates a Google.Apis.Bigquery.v2.Data.DatasetReference and delegates to PatchDataset(DatasetReference, Dataset, PatchDatasetOptions).
Parameters | |
---|---|
Name | Description |
datasetId | String The dataset ID. Must not be null. |
resource | Google.Apis.Bigquery.v2.Data.Dataset The dataset resource representation to use for the patch. Only fields present in the resource will be updated. |
options | PatchDatasetOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
BigQueryDataset | The updated dataset. |
If the resource contains an ETag, it is used for optimistic concurrency validation.
BigQueryClient client = BigQueryClient.Create(projectId);
// There's no ETag in this Dataset, so the patch will be applied unconditionally.
// If we specified an ETag, the patch would only be applied if it matched.
client.PatchDataset(datasetId, new Dataset { FriendlyName = "Patched dataset" } );
// Fetch just to make sure it's really changed...
BigQueryDataset fetched = client.GetDataset(datasetId);
Console.WriteLine($"Fetched dataset friendly name: {fetched.Resource.FriendlyName}");
PatchDataset(String, String, Dataset, PatchDatasetOptions)
public virtual BigQueryDataset PatchDataset(string projectId, string datasetId, Dataset resource, PatchDatasetOptions options = null)
Patches the specified dataset with fields in the given resource. This method just creates a Google.Apis.Bigquery.v2.Data.DatasetReference and delegates to PatchDataset(DatasetReference, Dataset, PatchDatasetOptions).
Parameters | |
---|---|
Name | Description |
projectId | String The project ID. Must not be null. |
datasetId | String The dataset ID. Must not be null. |
resource | Google.Apis.Bigquery.v2.Data.Dataset The dataset resource representation to use for the patch. Only fields present in the resource will be updated. |
options | PatchDatasetOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
BigQueryDataset | The updated dataset. |
If the resource contains an ETag, it is used for optimistic concurrency validation.
See PatchDataset for an example using an alternative overload.
PatchDatasetAsync(DatasetReference, Dataset, PatchDatasetOptions, CancellationToken)
public virtual Task<BigQueryDataset> PatchDatasetAsync(DatasetReference datasetReference, Dataset resource, PatchDatasetOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously patches the specified dataset with fields in the given resource.
Parameters | |
---|---|
Name | Description |
datasetReference | Google.Apis.Bigquery.v2.Data.DatasetReference A fully-qualified identifier for the dataset. Must not be null. |
resource | Google.Apis.Bigquery.v2.Data.Dataset The dataset resource representation to use for the patch. Only fields present in the resource will be updated. |
options | PatchDatasetOptions 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<BigQueryDataset> | A task representing the asynchronous operation. When complete, the result is the updated dataset. |
If the resource contains an ETag, it is used for optimistic concurrency validation.
See PatchDataset for a synchronous example.
PatchDatasetAsync(String, Dataset, PatchDatasetOptions, CancellationToken)
public virtual Task<BigQueryDataset> PatchDatasetAsync(string datasetId, Dataset resource, PatchDatasetOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously patches the specified dataset within this client's project with fields in the given resource. This method just creates a Google.Apis.Bigquery.v2.Data.DatasetReference and delegates to PatchDatasetAsync(DatasetReference, Dataset, PatchDatasetOptions, CancellationToken).
Parameters | |
---|---|
Name | Description |
datasetId | String The dataset ID. Must not be null. |
resource | Google.Apis.Bigquery.v2.Data.Dataset The dataset resource representation to use for the patch. Only fields present in the resource will be updated. |
options | PatchDatasetOptions 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<BigQueryDataset> | A task representing the asynchronous operation. When complete, the result is the updated dataset. |
If the resource contains an ETag, it is used for optimistic concurrency validation.
See PatchDataset for a synchronous example.
PatchDatasetAsync(String, String, Dataset, PatchDatasetOptions, CancellationToken)
public virtual Task<BigQueryDataset> PatchDatasetAsync(string projectId, string datasetId, Dataset resource, PatchDatasetOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously patches the specified dataset with fields in the given resource. This method just creates a Google.Apis.Bigquery.v2.Data.DatasetReference and delegates to PatchDatasetAsync(DatasetReference, Dataset, PatchDatasetOptions, CancellationToken).
Parameters | |
---|---|
Name | Description |
projectId | String The project ID. Must not be null. |
datasetId | String The dataset ID. Must not be null. |
resource | Google.Apis.Bigquery.v2.Data.Dataset The dataset resource representation to use for the patch. Only fields present in the resource will be updated. |
options | PatchDatasetOptions 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<BigQueryDataset> | A task representing the asynchronous operation. When complete, the result is the updated dataset. |
If the resource contains an ETag, it is used for optimistic concurrency validation.
See PatchDataset for a synchronous example.
PatchModel(ModelReference, Model, PatchModelOptions)
public virtual BigQueryModel PatchModel(ModelReference modelReference, Model resource, PatchModelOptions options = null)
Patches the specified model with fields in the given resource.
Parameters | |
---|---|
Name | Description |
modelReference | Google.Apis.Bigquery.v2.Data.ModelReference A fully-qualified identifier for the model. Must not be null. |
resource | Google.Apis.Bigquery.v2.Data.Model The model resource representation to use for the patch. Only fields present in the resource will be updated. |
options | PatchModelOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
BigQueryModel | The updated model. |
If the resource contains an ETag, it is used for optimistic concurrency validation.
PatchModel(String, String, Model, PatchModelOptions)
public virtual BigQueryModel PatchModel(string datasetId, string modelId, Model resource, PatchModelOptions options = null)
Patches the specified model within this client's project with fields in the given resource. This method just creates a Google.Apis.Bigquery.v2.Data.ModelReference and delegates to PatchModel(ModelReference, Model, PatchModelOptions).
Parameters | |
---|---|
Name | Description |
datasetId | String The dataset ID. Must not be null. |
modelId | String The model ID. Must not be null. |
resource | Google.Apis.Bigquery.v2.Data.Model The model resource representation to use for the patch. Only fields present in the resource will be updated. |
options | PatchModelOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
BigQueryModel | The updated model. |
If the resource contains an ETag, it is used for optimistic concurrency validation.
PatchModel(String, String, String, Model, PatchModelOptions)
public virtual BigQueryModel PatchModel(string projectId, string datasetId, string modelId, Model resource, PatchModelOptions options = null)
Patches the specified model with fields in the given resource. This method just creates a Google.Apis.Bigquery.v2.Data.ModelReference and delegates to PatchModel(ModelReference, Model, PatchModelOptions).
Parameters | |
---|---|
Name | Description |
projectId | String The project ID. Must not be null. |
datasetId | String The dataset ID. Must not be null. |
modelId | String The model ID. Must not be null. |
resource | Google.Apis.Bigquery.v2.Data.Model The model resource representation to use for the patch. Only fields present in the resource will be updated. |
options | PatchModelOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
BigQueryModel | The updated model. |
If the resource contains an ETag, it is used for optimistic concurrency validation.
PatchModelAsync(ModelReference, Model, PatchModelOptions, CancellationToken)
public virtual Task<BigQueryModel> PatchModelAsync(ModelReference modelReference, Model resource, PatchModelOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously patches the specified model with fields in the given resource.
Parameters | |
---|---|
Name | Description |
modelReference | Google.Apis.Bigquery.v2.Data.ModelReference A fully-qualified identifier for the model. Must not be null. |
resource | Google.Apis.Bigquery.v2.Data.Model The model resource representation to use for the patch. Only fields present in the resource will be updated. |
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. |
If the resource contains an ETag, it is used for optimistic concurrency validation.
PatchModelAsync(String, String, Model, PatchModelOptions, CancellationToken)
public virtual Task<BigQueryModel> PatchModelAsync(string datasetId, string modelId, Model resource, PatchModelOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously patches the specified model within this client's project with fields in the given resource. This method just creates a Google.Apis.Bigquery.v2.Data.ModelReference and delegates to PatchModelAsync(ModelReference, Model, PatchModelOptions, CancellationToken).
Parameters | |
---|---|
Name | Description |
datasetId | String The dataset ID. Must not be null. |
modelId | String The model ID. Must not be null. |
resource | Google.Apis.Bigquery.v2.Data.Model The model resource representation to use for the patch. Only fields present in the resource will be updated. |
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. |
If the resource contains an ETag, it is used for optimistic concurrency validation.
PatchModelAsync(String, String, String, Model, PatchModelOptions, CancellationToken)
public virtual Task<BigQueryModel> PatchModelAsync(string projectId, string datasetId, string modelId, Model resource, PatchModelOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously patches the specified model with fields in the given resource. This method just creates a Google.Apis.Bigquery.v2.Data.ModelReference and delegates to PatchModelAsync(ModelReference, Model, PatchModelOptions, CancellationToken).
Parameters | |
---|---|
Name | Description |
projectId | String The project ID. Must not be null. |
datasetId | String The dataset ID. Must not be null. |
modelId | String The model ID. Must not be null. |
resource | Google.Apis.Bigquery.v2.Data.Model The model resource representation to use for the patch. Only fields present in the resource will be updated. |
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. |
If the resource contains an ETag, it is used for optimistic concurrency validation.
PatchTable(TableReference, Table, PatchTableOptions)
public virtual BigQueryTable PatchTable(TableReference tableReference, Table resource, PatchTableOptions options = null)
Patches the specified table with fields in the given resource.
Parameters | |
---|---|
Name | Description |
tableReference | Google.Apis.Bigquery.v2.Data.TableReference A fully-qualified identifier for the table. Must not be null. |
resource | Google.Apis.Bigquery.v2.Data.Table The table resource representation to use for the patch. Only fields present in the resource will be updated. |
options | PatchTableOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
BigQueryTable | The updated table. |
If the resource contains an ETag, it is used for optimistic concurrency validation.
See PatchTable for an example using an alternative overload.
PatchTable(String, String, Table, PatchTableOptions)
public virtual BigQueryTable PatchTable(string datasetId, string tableId, Table resource, PatchTableOptions options = null)
Patches the specified table within this client's project with fields in the given resource. This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to PatchTable(TableReference, Table, PatchTableOptions).
Parameters | |
---|---|
Name | Description |
datasetId | String The dataset ID. Must not be null. |
tableId | String The table ID. Must not be null. |
resource | Google.Apis.Bigquery.v2.Data.Table The table resource representation to use for the patch. Only fields present in the resource will be updated. |
options | PatchTableOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
BigQueryTable | The updated table. |
If the resource contains an ETag, it is used for optimistic concurrency validation.
BigQueryClient client = BigQueryClient.Create(projectId);
// There's no ETag in this Table, so the patch will be applied unconditionally.
// If we specified an ETag, the patch would only be applied if it matched.
client.PatchTable(datasetId, tableId, new Table { FriendlyName = "Patched table" });
// Fetch just to make sure it's really changed...
BigQueryTable fetched = client.GetTable(datasetId, tableId);
Console.WriteLine($"Fetched table friendly name: {fetched.Resource.FriendlyName}");
PatchTable(String, String, String, Table, PatchTableOptions)
public virtual BigQueryTable PatchTable(string projectId, string datasetId, string tableId, Table resource, PatchTableOptions options = null)
Patches the specified table with fields in the given resource. This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to PatchTable(TableReference, Table, PatchTableOptions).
Parameters | |
---|---|
Name | Description |
projectId | String The project ID. Must not be null. |
datasetId | String The dataset ID. Must not be null. |
tableId | String The table ID. Must not be null. |
resource | Google.Apis.Bigquery.v2.Data.Table The table resource representation to use for the patch. Only fields present in the resource will be updated. |
options | PatchTableOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
BigQueryTable | The updated table. |
If the resource contains an ETag, it is used for optimistic concurrency validation.
See PatchTable for an example using an alternative overload.
PatchTableAsync(TableReference, Table, PatchTableOptions, CancellationToken)
public virtual Task<BigQueryTable> PatchTableAsync(TableReference tableReference, Table resource, PatchTableOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously patches the specified table with fields in the given resource.
Parameters | |
---|---|
Name | Description |
tableReference | Google.Apis.Bigquery.v2.Data.TableReference A fully-qualified identifier for the table. Must not be null. |
resource | Google.Apis.Bigquery.v2.Data.Table The table resource representation to use for the patch. Only fields present in the resource will be updated. |
options | PatchTableOptions 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<BigQueryTable> | A task representing the asynchronous operation. When complete, the result is the updated table. |
If the resource contains an ETag, it is used for optimistic concurrency validation.
See PatchTable for a synchronous example.
PatchTableAsync(String, String, Table, PatchTableOptions, CancellationToken)
public virtual Task<BigQueryTable> PatchTableAsync(string datasetId, string tableId, Table resource, PatchTableOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously patches the specified table within this client's project with fields in the given resource. This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to PatchTableAsync(TableReference, Table, PatchTableOptions, CancellationToken).
Parameters | |
---|---|
Name | Description |
datasetId | String The dataset ID. Must not be null. |
tableId | String The table ID. Must not be null. |
resource | Google.Apis.Bigquery.v2.Data.Table The table resource representation to use for the patch. Only fields present in the resource will be updated. |
options | PatchTableOptions 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<BigQueryTable> | A task representing the asynchronous operation. When complete, the result is the updated table. |
If the resource contains an ETag, it is used for optimistic concurrency validation.
See PatchTable for a synchronous example.
PatchTableAsync(String, String, String, Table, PatchTableOptions, CancellationToken)
public virtual Task<BigQueryTable> PatchTableAsync(string projectId, string datasetId, string tableId, Table resource, PatchTableOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously patches the specified table with fields in the given resource. This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to PatchTableAsync(TableReference, Table, PatchTableOptions, CancellationToken).
Parameters | |
---|---|
Name | Description |
projectId | String The project ID. Must not be null. |
datasetId | String The dataset ID. Must not be null. |
tableId | String The table ID. Must not be null. |
resource | Google.Apis.Bigquery.v2.Data.Table The table resource representation to use for the patch. Only fields present in the resource will be updated. |
options | PatchTableOptions 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<BigQueryTable> | A task representing the asynchronous operation. When complete, the result is the updated table. |
If the resource contains an ETag, it is used for optimistic concurrency validation.
See PatchTable for a synchronous example.
PollJobUntilCompleted(JobReference, GetJobOptions, PollSettings)
public virtual BigQueryJob PollJobUntilCompleted(JobReference jobReference, GetJobOptions options = null, PollSettings pollSettings = null)
Polls the specified job for completion.
Parameters | |
---|---|
Name | Description |
jobReference | Google.Apis.Bigquery.v2.Data.JobReference A fully-qualified identifier for the job. Must not be null. |
options | GetJobOptions The options for the operation. May be null, in which case defaults will be supplied. |
pollSettings | PollSettings The settings to control how often and long the job is fetched before timing out if it is still incomplete. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
BigQueryJob | The completed job. |
See PollJobUntilCompleted for an example using an alternative overload.
PollJobUntilCompleted(String, GetJobOptions, PollSettings)
public virtual BigQueryJob PollJobUntilCompleted(string jobId, GetJobOptions options = null, PollSettings pollSettings = null)
Polls the specified job within this client's project for completion. This method just creates a Google.Apis.Bigquery.v2.Data.JobReference and delegates to PollJobUntilCompleted(JobReference, GetJobOptions, PollSettings).
Parameters | |
---|---|
Name | Description |
jobId | String The job ID. Must not be null. |
options | GetJobOptions The options for the operation. May be null, in which case defaults will be supplied. |
pollSettings | PollSettings The settings to control how often and long the job is fetched before timing out if it is still incomplete. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
BigQueryJob | The completed job. |
// Just an example of a job: extracting data to Google Cloud Storage.
BigQueryClient client = BigQueryClient.Create(projectId);
string destinationUri = $"gs://{bucket}/{objectName}";
// Start the job running...
BigQueryJob job = client.CreateExtractJob(projectId, datasetId, tableId, destinationUri);
string jobId = job.Reference.JobId;
// Imagine code here to store the ID somewhere, e.g. a database.
// We later come back and want to wait for the job to complete.
BigQueryJob completedJob = client.PollJobUntilCompleted(jobId);
PollJobUntilCompleted(String, String, GetJobOptions, PollSettings)
public virtual BigQueryJob PollJobUntilCompleted(string projectId, string jobId, GetJobOptions options = null, PollSettings pollSettings = null)
Polls the specified job for completion. This method just creates a Google.Apis.Bigquery.v2.Data.JobReference and delegates to PollJobUntilCompleted(JobReference, GetJobOptions, PollSettings).
Parameters | |
---|---|
Name | Description |
projectId | String The project ID. Must not be null. |
jobId | String The job ID. Must not be null. |
options | GetJobOptions The options for the operation. May be null, in which case defaults will be supplied. |
pollSettings | PollSettings The settings to control how often and long the job is fetched before timing out if it is still incomplete. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
BigQueryJob | The completed job. |
See PollJobUntilCompleted for an example using an alternative overload.
PollJobUntilCompletedAsync(JobReference, GetJobOptions, PollSettings, CancellationToken)
public virtual Task<BigQueryJob> PollJobUntilCompletedAsync(JobReference jobReference, GetJobOptions options = null, PollSettings pollSettings = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously polls the specified job for completion.
Parameters | |
---|---|
Name | Description |
jobReference | Google.Apis.Bigquery.v2.Data.JobReference A fully-qualified identifier for the job. Must not be null. |
options | GetJobOptions The options for the operation. May be null, in which case defaults will be supplied. |
pollSettings | PollSettings The settings to control how often and long the job is fetched before timing out if it is still incomplete. 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 completed job. |
See PollJobUntilCompleted for a synchronous example.
PollJobUntilCompletedAsync(String, GetJobOptions, PollSettings, CancellationToken)
public virtual Task<BigQueryJob> PollJobUntilCompletedAsync(string jobId, GetJobOptions options = null, PollSettings pollSettings = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously polls the specified job within this client's project for completion. This method just creates a Google.Apis.Bigquery.v2.Data.JobReference and delegates to PollJobUntilCompletedAsync(JobReference, GetJobOptions, PollSettings, CancellationToken).
Parameters | |
---|---|
Name | Description |
jobId | String The job ID. Must not be null. |
options | GetJobOptions The options for the operation. May be null, in which case defaults will be supplied. |
pollSettings | PollSettings The settings to control how often and long the job is fetched before timing out if it is still incomplete. 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 completed job. |
See PollJobUntilCompleted for a synchronous example.
PollJobUntilCompletedAsync(String, String, GetJobOptions, PollSettings, CancellationToken)
public virtual Task<BigQueryJob> PollJobUntilCompletedAsync(string projectId, string jobId, GetJobOptions options = null, PollSettings pollSettings = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously polls the specified job for completion. This method just creates a Google.Apis.Bigquery.v2.Data.JobReference and delegates to PollJobUntilCompletedAsync(JobReference, GetJobOptions, PollSettings, CancellationToken).
Parameters | |
---|---|
Name | Description |
projectId | String The project ID. Must not be null. |
jobId | String The job ID. Must not be null. |
options | GetJobOptions The options for the operation. May be null, in which case defaults will be supplied. |
pollSettings | PollSettings The settings to control how often and long the job is fetched before timing out if it is still incomplete. 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 completed job. |
See PollJobUntilCompleted for a synchronous example.
RemoveDatasetLabel(DatasetReference, String, ModifyLabelsOptions)
public virtual string RemoveDatasetLabel(DatasetReference datasetReference, string labelName, ModifyLabelsOptions options = null)
Removes a label from a dataset, if it previously existed. It is not an error to attempt to remove a label that doesn't already exist.
Parameters | |
---|---|
Name | Description |
datasetReference | Google.Apis.Bigquery.v2.Data.DatasetReference A fully-qualified identifier for the dataset. Must not be null. |
labelName | String The name of the label. Must not be null. |
options | ModifyLabelsOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
String | The previous value of the label, or |
See RemoveDatasetLabel for an example using an alternative overload.
RemoveDatasetLabel(String, String, ModifyLabelsOptions)
public virtual string RemoveDatasetLabel(string datasetId, string labelName, ModifyLabelsOptions options = null)
Removes a label from a dataset, if it previously existed. It is not an error to attempt to remove a label that doesn't already exist. This method just creates a Google.Apis.Bigquery.v2.Data.DatasetReference and delegates to RemoveDatasetLabel(DatasetReference, String, ModifyLabelsOptions).
Parameters | |
---|---|
Name | Description |
datasetId | String The dataset ID. Must not be null. |
labelName | String The name of the label. Must not be null. |
options | ModifyLabelsOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
String | The previous value of the label, or |
BigQueryClient client = BigQueryClient.Create(projectId);
string previousValue = client.RemoveDatasetLabel(datasetId, "labelName");
Console.WriteLine($"Previous label value: {previousValue}");
RemoveDatasetLabel(String, String, String, ModifyLabelsOptions)
public virtual string RemoveDatasetLabel(string projectId, string datasetId, string labelName, ModifyLabelsOptions options = null)
Removes a label from a dataset, if it previously existed. It is not an error to attempt to remove a label that doesn't already exist. This method just creates a Google.Apis.Bigquery.v2.Data.DatasetReference and delegates to RemoveDatasetLabel(DatasetReference, String, ModifyLabelsOptions).
Parameters | |
---|---|
Name | Description |
projectId | String The project ID. Must not be null. |
datasetId | String The dataset ID. Must not be null. |
labelName | String The name of the label. Must not be null. |
options | ModifyLabelsOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
String | The previous value of the label, or |
See RemoveDatasetLabel for an example using an alternative overload.
RemoveDatasetLabelAsync(DatasetReference, String, ModifyLabelsOptions, CancellationToken)
public virtual Task<string> RemoveDatasetLabelAsync(DatasetReference datasetReference, string labelName, ModifyLabelsOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously removes a label from a dataset, if it previously existed. It is not an error to attempt to remove a label that doesn't already exist.
Parameters | |
---|---|
Name | Description |
datasetReference | Google.Apis.Bigquery.v2.Data.DatasetReference A fully-qualified identifier for the dataset. Must not be null. |
labelName | String The name of the label. Must not be null. |
options | ModifyLabelsOptions 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<String> | A task representing the asynchronous operation. When complete, the result is
the previous value of the label, or |
See RemoveDatasetLabel for a synchronous example.
RemoveDatasetLabelAsync(String, String, ModifyLabelsOptions, CancellationToken)
public virtual Task<string> RemoveDatasetLabelAsync(string datasetId, string labelName, ModifyLabelsOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously removes a label from a dataset, if it previously existed. It is not an error to attempt to remove a label that doesn't already exist. This method just creates a Google.Apis.Bigquery.v2.Data.DatasetReference and delegates to RemoveDatasetLabelAsync(DatasetReference, String, ModifyLabelsOptions, CancellationToken).
Parameters | |
---|---|
Name | Description |
datasetId | String The dataset ID. Must not be null. |
labelName | String The name of the label. Must not be null. |
options | ModifyLabelsOptions 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<String> | A task representing the asynchronous operation. When complete, the result is
the previous value of the label, or |
See RemoveDatasetLabel for a synchronous example.
RemoveDatasetLabelAsync(String, String, String, ModifyLabelsOptions, CancellationToken)
public virtual Task<string> RemoveDatasetLabelAsync(string projectId, string datasetId, string labelName, ModifyLabelsOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously removes a label from a dataset, if it previously existed. It is not an error to attempt to remove a label that doesn't already exist. This method just creates a Google.Apis.Bigquery.v2.Data.DatasetReference and delegates to RemoveDatasetLabelAsync(DatasetReference, String, ModifyLabelsOptions, CancellationToken).
Parameters | |
---|---|
Name | Description |
projectId | String The project ID. Must not be null. |
datasetId | String The dataset ID. Must not be null. |
labelName | String The name of the label. Must not be null. |
options | ModifyLabelsOptions 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<String> | A task representing the asynchronous operation. When complete, the result is
the previous value of the label, or |
See RemoveDatasetLabel for a synchronous example.
SetDatasetLabel(DatasetReference, String, String, ModifyLabelsOptions)
public virtual string SetDatasetLabel(DatasetReference datasetReference, string labelName, string labelValue, ModifyLabelsOptions options = null)
Sets the value for a single label on a dataset. The label will be added if it does not exist, or updated if it already exists.
Parameters | |
---|---|
Name | Description |
datasetReference | Google.Apis.Bigquery.v2.Data.DatasetReference A fully-qualified identifier for the dataset. Must not be null. |
labelName | String The name of the label. Must not be null. |
labelValue | String The new value of the label. Must not be null. |
options | ModifyLabelsOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
String | The previous value of the label, or |
The dataset is first fetched to retrieve the current values, then a patch call is made.
See SetDatasetLabel for an example using an alternative overload.
SetDatasetLabel(String, String, String, ModifyLabelsOptions)
public virtual string SetDatasetLabel(string datasetId, string labelName, string labelValue, ModifyLabelsOptions options = null)
Sets the value for a single label on a dataset. The label will be added if it does not exist, or updated if it already exists. This method just creates a Google.Apis.Bigquery.v2.Data.DatasetReference and delegates to SetDatasetLabel(DatasetReference, String, String, ModifyLabelsOptions).
Parameters | |
---|---|
Name | Description |
datasetId | String The dataset ID. Must not be null. |
labelName | String The name of the label. Must not be null. |
labelValue | String The new value of the label. Must not be null. |
options | ModifyLabelsOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
String | The previous value of the label, or |
The dataset is first fetched to retrieve the current values, then a patch call is made.
BigQueryClient client = BigQueryClient.Create(projectId);
string previousValue = client.SetDatasetLabel(datasetId, "label_name", "new_label_value");
Console.WriteLine($"Previous label value: {previousValue}");
SetDatasetLabel(String, String, String, String, ModifyLabelsOptions)
public virtual string SetDatasetLabel(string projectId, string datasetId, string labelName, string labelValue, ModifyLabelsOptions options = null)
Sets the value for a single label on a dataset. The label will be added if it does not exist, or updated if it already exists. This method just creates a Google.Apis.Bigquery.v2.Data.DatasetReference and delegates to SetDatasetLabel(DatasetReference, String, String, ModifyLabelsOptions).
Parameters | |
---|---|
Name | Description |
projectId | String The project ID. Must not be null. |
datasetId | String The dataset ID. Must not be null. |
labelName | String The name of the label. Must not be null. |
labelValue | String The new value of the label. Must not be null. |
options | ModifyLabelsOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
String | The previous value of the label, or |
The dataset is first fetched to retrieve the current values, then a patch call is made.
See SetDatasetLabel for an example using an alternative overload.
SetDatasetLabelAsync(DatasetReference, String, String, ModifyLabelsOptions, CancellationToken)
public virtual Task<string> SetDatasetLabelAsync(DatasetReference datasetReference, string labelName, string labelValue, ModifyLabelsOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously sets the value for a single label on a dataset. The label will be added if it does not exist, or updated if it already exists.
Parameters | |
---|---|
Name | Description |
datasetReference | Google.Apis.Bigquery.v2.Data.DatasetReference A fully-qualified identifier for the dataset. Must not be null. |
labelName | String The name of the label. Must not be null. |
labelValue | String The new value of the label. Must not be null. |
options | ModifyLabelsOptions 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<String> | A task representing the asynchronous operation. When complete, the result is
the previous value of the label, or |
The dataset is first fetched to retrieve the current values, then a patch call is made.
See SetDatasetLabel for a synchronous example.
SetDatasetLabelAsync(String, String, String, ModifyLabelsOptions, CancellationToken)
public virtual Task<string> SetDatasetLabelAsync(string datasetId, string labelName, string labelValue, ModifyLabelsOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously sets the value for a single label on a dataset. The label will be added if it does not exist, or updated if it already exists. This method just creates a Google.Apis.Bigquery.v2.Data.DatasetReference and delegates to SetDatasetLabelAsync(DatasetReference, String, String, ModifyLabelsOptions, CancellationToken).
Parameters | |
---|---|
Name | Description |
datasetId | String The dataset ID. Must not be null. |
labelName | String The name of the label. Must not be null. |
labelValue | String The new value of the label. Must not be null. |
options | ModifyLabelsOptions 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<String> | A task representing the asynchronous operation. When complete, the result is
the previous value of the label, or |
The dataset is first fetched to retrieve the current values, then a patch call is made.
See SetDatasetLabel for a synchronous example.
SetDatasetLabelAsync(String, String, String, String, ModifyLabelsOptions, CancellationToken)
public virtual Task<string> SetDatasetLabelAsync(string projectId, string datasetId, string labelName, string labelValue, ModifyLabelsOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously sets the value for a single label on a dataset. The label will be added if it does not exist, or updated if it already exists. This method just creates a Google.Apis.Bigquery.v2.Data.DatasetReference and delegates to SetDatasetLabelAsync(DatasetReference, String, String, ModifyLabelsOptions, CancellationToken).
Parameters | |
---|---|
Name | Description |
projectId | String The project ID. Must not be null. |
datasetId | String The dataset ID. Must not be null. |
labelName | String The name of the label. Must not be null. |
labelValue | String The new value of the label. Must not be null. |
options | ModifyLabelsOptions 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<String> | A task representing the asynchronous operation. When complete, the result is
the previous value of the label, or |
The dataset is first fetched to retrieve the current values, then a patch call is made.
See SetDatasetLabel for a synchronous example.
SetTableIamPolicy(TableReference, Policy, SetTableIamPolicyOptions)
public virtual Policy SetTableIamPolicy(TableReference tableReference, Policy policy, SetTableIamPolicyOptions options = null)
Applies the given IAM policy to the specified table.
Parameters | |
---|---|
Name | Description |
tableReference | Google.Apis.Bigquery.v2.Data.TableReference A fully-qualified identifier for the table. Must not be null. |
policy | Google.Apis.Bigquery.v2.Data.Policy The policy to set on the table. An update mask may be specified through options. |
options | SetTableIamPolicyOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
Google.Apis.Bigquery.v2.Data.Policy | The resulting IAM policy after aplying the given policy. |
SetTableIamPolicy(String, String, Policy, SetTableIamPolicyOptions)
public virtual Policy SetTableIamPolicy(string datasetId, string tableId, Policy policy, SetTableIamPolicyOptions options = null)
Applies the given IAM policy to the specified table within this client's project. This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to SetTableIamPolicy(TableReference, Policy, SetTableIamPolicyOptions).
Parameters | |
---|---|
Name | Description |
datasetId | String The dataset ID. Must not be null. |
tableId | String The table ID. Must not be null. |
policy | Google.Apis.Bigquery.v2.Data.Policy The policy to set on the table. An update mask may be specified through options. |
options | SetTableIamPolicyOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
Google.Apis.Bigquery.v2.Data.Policy | The resulting IAM policy after aplying the given policy. |
SetTableIamPolicy(String, String, String, Policy, SetTableIamPolicyOptions)
public virtual Policy SetTableIamPolicy(string projectId, string datasetId, string tableId, Policy policy, SetTableIamPolicyOptions options = null)
Applies the given IAM policy to the specified table. This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to SetTableIamPolicy(TableReference, Policy, SetTableIamPolicyOptions).
Parameters | |
---|---|
Name | Description |
projectId | String The project ID. Must not be null. |
datasetId | String The dataset ID. Must not be null. |
tableId | String The table ID. Must not be null. |
policy | Google.Apis.Bigquery.v2.Data.Policy The policy to set on the table. An update mask may be specified through options. |
options | SetTableIamPolicyOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
Google.Apis.Bigquery.v2.Data.Policy | The resulting IAM policy after aplying the given policy. |
SetTableIamPolicyAsync(TableReference, Policy, SetTableIamPolicyOptions, CancellationToken)
public virtual Task<Policy> SetTableIamPolicyAsync(TableReference tableReference, Policy policy, SetTableIamPolicyOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously applies the given IAM policy to the specified table.
Parameters | |
---|---|
Name | Description |
tableReference | Google.Apis.Bigquery.v2.Data.TableReference A fully-qualified identifier for the table. Must not be null. |
policy | Google.Apis.Bigquery.v2.Data.Policy The policy to set on the table. An update mask may be specified through options. |
options | SetTableIamPolicyOptions 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<Google.Apis.Bigquery.v2.Data.Policy> | A task representing the asynchronous operation. When complete, the result is the resulting IAM policy after aplying the given policy. |
SetTableIamPolicyAsync(String, String, Policy, SetTableIamPolicyOptions, CancellationToken)
public virtual Task<Policy> SetTableIamPolicyAsync(string datasetId, string tableId, Policy policy, SetTableIamPolicyOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously applies the given IAM policy to the specified table within this client's project. This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to SetTableIamPolicyAsync(TableReference, Policy, SetTableIamPolicyOptions, CancellationToken).
Parameters | |
---|---|
Name | Description |
datasetId | String The dataset ID. Must not be null. |
tableId | String The table ID. Must not be null. |
policy | Google.Apis.Bigquery.v2.Data.Policy The policy to set on the table. An update mask may be specified through options. |
options | SetTableIamPolicyOptions 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<Google.Apis.Bigquery.v2.Data.Policy> | A task representing the asynchronous operation. When complete, the result is the resulting IAM policy after aplying the given policy. |
SetTableIamPolicyAsync(String, String, String, Policy, SetTableIamPolicyOptions, CancellationToken)
public virtual Task<Policy> SetTableIamPolicyAsync(string projectId, string datasetId, string tableId, Policy policy, SetTableIamPolicyOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously applies the given IAM policy to the specified table. This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to SetTableIamPolicyAsync(TableReference, Policy, SetTableIamPolicyOptions, CancellationToken).
Parameters | |
---|---|
Name | Description |
projectId | String The project ID. Must not be null. |
datasetId | String The dataset ID. Must not be null. |
tableId | String The table ID. Must not be null. |
policy | Google.Apis.Bigquery.v2.Data.Policy The policy to set on the table. An update mask may be specified through options. |
options | SetTableIamPolicyOptions 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<Google.Apis.Bigquery.v2.Data.Policy> | A task representing the asynchronous operation. When complete, the result is the resulting IAM policy after aplying the given policy. |
TestTableIamPermissions(TableReference, IList<String>, TestTableIamPermissionsOptions)
public virtual TestIamPermissionsResponse TestTableIamPermissions(TableReference tableReference, IList<string> permissions, TestTableIamPermissionsOptions options = null)
Returns the subset of permissions that the caller has on the specified table.
Parameters | |
---|---|
Name | Description |
tableReference | Google.Apis.Bigquery.v2.Data.TableReference A fully-qualified identifier for the table. Must not be null. |
permissions | IList<String> The permissions to test on the table. |
options | TestTableIamPermissionsOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
Google.Apis.Bigquery.v2.Data.TestIamPermissionsResponse | The subset of permissions that the caller has on {target}. |
TestTableIamPermissions(String, String, IList<String>, TestTableIamPermissionsOptions)
public virtual TestIamPermissionsResponse TestTableIamPermissions(string datasetId, string tableId, IList<string> permissions, TestTableIamPermissionsOptions options = null)
Returns the subset of permissions that the caller has on the specified table within this client's project. This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to TestTableIamPermissions(TableReference, IList<String>, TestTableIamPermissionsOptions).
Parameters | |
---|---|
Name | Description |
datasetId | String The dataset ID. Must not be null. |
tableId | String The table ID. Must not be null. |
permissions | IList<String> The permissions to test on the table. |
options | TestTableIamPermissionsOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
Google.Apis.Bigquery.v2.Data.TestIamPermissionsResponse | The subset of permissions that the caller has on {target}. |
TestTableIamPermissions(String, String, String, IList<String>, TestTableIamPermissionsOptions)
public virtual TestIamPermissionsResponse TestTableIamPermissions(string projectId, string datasetId, string tableId, IList<string> permissions, TestTableIamPermissionsOptions options = null)
Returns the subset of permissions that the caller has on the specified table. This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to TestTableIamPermissions(TableReference, IList<String>, TestTableIamPermissionsOptions).
Parameters | |
---|---|
Name | Description |
projectId | String The project ID. Must not be null. |
datasetId | String The dataset ID. Must not be null. |
tableId | String The table ID. Must not be null. |
permissions | IList<String> The permissions to test on the table. |
options | TestTableIamPermissionsOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
Google.Apis.Bigquery.v2.Data.TestIamPermissionsResponse | The subset of permissions that the caller has on {target}. |
TestTableIamPermissionsAsync(TableReference, IList<String>, TestTableIamPermissionsOptions, CancellationToken)
public virtual Task<TestIamPermissionsResponse> TestTableIamPermissionsAsync(TableReference tableReference, IList<string> permissions, TestTableIamPermissionsOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously returns the subset of permissions that the caller has on the specified table.
Parameters | |
---|---|
Name | Description |
tableReference | Google.Apis.Bigquery.v2.Data.TableReference A fully-qualified identifier for the table. Must not be null. |
permissions | IList<String> The permissions to test on the table. |
options | TestTableIamPermissionsOptions 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<Google.Apis.Bigquery.v2.Data.TestIamPermissionsResponse> | A task representing the asynchronous operation. When complete, the result is the subset of permissions that the caller has on {target}. |
TestTableIamPermissionsAsync(String, String, IList<String>, TestTableIamPermissionsOptions, CancellationToken)
public virtual Task<TestIamPermissionsResponse> TestTableIamPermissionsAsync(string datasetId, string tableId, IList<string> permissions, TestTableIamPermissionsOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously returns the subset of permissions that the caller has on the specified table within this client's project. This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to TestTableIamPermissionsAsync(TableReference, IList<String>, TestTableIamPermissionsOptions, CancellationToken).
Parameters | |
---|---|
Name | Description |
datasetId | String The dataset ID. Must not be null. |
tableId | String The table ID. Must not be null. |
permissions | IList<String> The permissions to test on the table. |
options | TestTableIamPermissionsOptions 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<Google.Apis.Bigquery.v2.Data.TestIamPermissionsResponse> | A task representing the asynchronous operation. When complete, the result is the subset of permissions that the caller has on {target}. |
TestTableIamPermissionsAsync(String, String, String, IList<String>, TestTableIamPermissionsOptions, CancellationToken)
public virtual Task<TestIamPermissionsResponse> TestTableIamPermissionsAsync(string projectId, string datasetId, string tableId, IList<string> permissions, TestTableIamPermissionsOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously returns the subset of permissions that the caller has on the specified table. This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to TestTableIamPermissionsAsync(TableReference, IList<String>, TestTableIamPermissionsOptions, CancellationToken).
Parameters | |
---|---|
Name | Description |
projectId | String The project ID. Must not be null. |
datasetId | String The dataset ID. Must not be null. |
tableId | String The table ID. Must not be null. |
permissions | IList<String> The permissions to test on the table. |
options | TestTableIamPermissionsOptions 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<Google.Apis.Bigquery.v2.Data.TestIamPermissionsResponse> | A task representing the asynchronous operation. When complete, the result is the subset of permissions that the caller has on {target}. |
UpdateDataset(DatasetReference, Dataset, UpdateDatasetOptions)
public virtual BigQueryDataset UpdateDataset(DatasetReference datasetReference, Dataset resource, UpdateDatasetOptions options = null)
Updates the specified dataset to match the specified resource.
Parameters | |
---|---|
Name | Description |
datasetReference | Google.Apis.Bigquery.v2.Data.DatasetReference A fully-qualified identifier for the dataset. Must not be null. |
resource | Google.Apis.Bigquery.v2.Data.Dataset The dataset resource representation to use for the update. All updatable fields will be updated. |
options | UpdateDatasetOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
BigQueryDataset | The updated dataset. |
If the resource contains an ETag, it is used for optimistic concurrency validation.
See UpdateDataset for an example using an alternative overload.
UpdateDataset(String, Dataset, UpdateDatasetOptions)
public virtual BigQueryDataset UpdateDataset(string datasetId, Dataset resource, UpdateDatasetOptions options = null)
Updates the specified dataset within this client's project to match the specified resource. This method just creates a Google.Apis.Bigquery.v2.Data.DatasetReference and delegates to UpdateDataset(DatasetReference, Dataset, UpdateDatasetOptions).
Parameters | |
---|---|
Name | Description |
datasetId | String The dataset ID. Must not be null. |
resource | Google.Apis.Bigquery.v2.Data.Dataset The dataset resource representation to use for the update. All updatable fields will be updated. |
options | UpdateDatasetOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
BigQueryDataset | The updated dataset. |
If the resource contains an ETag, it is used for optimistic concurrency validation.
BigQueryClient client = BigQueryClient.Create(projectId);
BigQueryDataset dataset = client.GetDataset(datasetId);
Dataset resource = dataset.Resource;
resource.FriendlyName = "Updated dataset";
// Alternatively, just call dataset.Update(). In either case,
// the etag in the resource will automatically be used for optimistic concurrency.
client.UpdateDataset(datasetId, resource);
// Fetch just to make sure it's really changed...
BigQueryDataset fetched = client.GetDataset(datasetId);
Console.WriteLine($"Fetched dataset friendly name: {fetched.Resource.FriendlyName}");
UpdateDataset(String, String, Dataset, UpdateDatasetOptions)
public virtual BigQueryDataset UpdateDataset(string projectId, string datasetId, Dataset resource, UpdateDatasetOptions options = null)
Updates the specified dataset to match the specified resource. This method just creates a Google.Apis.Bigquery.v2.Data.DatasetReference and delegates to UpdateDataset(DatasetReference, Dataset, UpdateDatasetOptions).
Parameters | |
---|---|
Name | Description |
projectId | String The project ID. Must not be null. |
datasetId | String The dataset ID. Must not be null. |
resource | Google.Apis.Bigquery.v2.Data.Dataset The dataset resource representation to use for the update. All updatable fields will be updated. |
options | UpdateDatasetOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
BigQueryDataset | The updated dataset. |
If the resource contains an ETag, it is used for optimistic concurrency validation.
See UpdateDataset for an example using an alternative overload.
UpdateDatasetAsync(DatasetReference, Dataset, UpdateDatasetOptions, CancellationToken)
public virtual Task<BigQueryDataset> UpdateDatasetAsync(DatasetReference datasetReference, Dataset resource, UpdateDatasetOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously updates the specified dataset to match the specified resource.
Parameters | |
---|---|
Name | Description |
datasetReference | Google.Apis.Bigquery.v2.Data.DatasetReference A fully-qualified identifier for the dataset. Must not be null. |
resource | Google.Apis.Bigquery.v2.Data.Dataset The dataset resource representation to use for the update. All updatable fields will be updated. |
options | UpdateDatasetOptions 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<BigQueryDataset> | A task representing the asynchronous operation. When complete, the result is the updated dataset. |
If the resource contains an ETag, it is used for optimistic concurrency validation.
See UpdateDataset for a synchronous example.
UpdateDatasetAsync(String, Dataset, UpdateDatasetOptions, CancellationToken)
public virtual Task<BigQueryDataset> UpdateDatasetAsync(string datasetId, Dataset resource, UpdateDatasetOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously updates the specified dataset within this client's project to match the specified resource. This method just creates a Google.Apis.Bigquery.v2.Data.DatasetReference and delegates to UpdateDatasetAsync(DatasetReference, Dataset, UpdateDatasetOptions, CancellationToken).
Parameters | |
---|---|
Name | Description |
datasetId | String The dataset ID. Must not be null. |
resource | Google.Apis.Bigquery.v2.Data.Dataset The dataset resource representation to use for the update. All updatable fields will be updated. |
options | UpdateDatasetOptions 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<BigQueryDataset> | A task representing the asynchronous operation. When complete, the result is the updated dataset. |
If the resource contains an ETag, it is used for optimistic concurrency validation.
See UpdateDataset for a synchronous example.
UpdateDatasetAsync(String, String, Dataset, UpdateDatasetOptions, CancellationToken)
public virtual Task<BigQueryDataset> UpdateDatasetAsync(string projectId, string datasetId, Dataset resource, UpdateDatasetOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously updates the specified dataset to match the specified resource. This method just creates a Google.Apis.Bigquery.v2.Data.DatasetReference and delegates to UpdateDatasetAsync(DatasetReference, Dataset, UpdateDatasetOptions, CancellationToken).
Parameters | |
---|---|
Name | Description |
projectId | String The project ID. Must not be null. |
datasetId | String The dataset ID. Must not be null. |
resource | Google.Apis.Bigquery.v2.Data.Dataset The dataset resource representation to use for the update. All updatable fields will be updated. |
options | UpdateDatasetOptions 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<BigQueryDataset> | A task representing the asynchronous operation. When complete, the result is the updated dataset. |
If the resource contains an ETag, it is used for optimistic concurrency validation.
See UpdateDataset for a synchronous example.
UpdateRoutine(RoutineReference, Routine, UpdateRoutineOptions)
public virtual BigQueryRoutine UpdateRoutine(RoutineReference routineReference, Routine resource, UpdateRoutineOptions options = null)
Updates the specified routine to match the specified resource.
Parameters | |
---|---|
Name | Description |
routineReference | Google.Apis.Bigquery.v2.Data.RoutineReference A fully-qualified identifier for the routine. Must not be null. |
resource | Google.Apis.Bigquery.v2.Data.Routine The routine resource representation to use for the update. All updatable fields will be updated. If this routine's Google.Apis.Bigquery.v2.Data.Routine.RoutineReference is specified, then it must be the same as the one obtained from the other parameters, else it will be set to the one obtained from the other parameters. |
options | UpdateRoutineOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
BigQueryRoutine | The updated routine. |
If the resource contains an ETag, it is used for optimistic concurrency validation.
UpdateRoutine(String, String, Routine, UpdateRoutineOptions)
public virtual BigQueryRoutine UpdateRoutine(string datasetId, string routineId, Routine resource, UpdateRoutineOptions options = null)
Updates the specified routine within this client's project to match the specified resource. This method just creates a Google.Apis.Bigquery.v2.Data.RoutineReference and delegates to UpdateRoutine(RoutineReference, Routine, UpdateRoutineOptions).
Parameters | |
---|---|
Name | Description |
datasetId | String The dataset ID. Must not be null. |
routineId | String The routine ID. Must not be null. |
resource | Google.Apis.Bigquery.v2.Data.Routine The routine resource representation to use for the update. All updatable fields will be updated. If this routine's Google.Apis.Bigquery.v2.Data.Routine.RoutineReference is specified, then it must be the same as the one obtained from the other parameters, else it will be set to the one obtained from the other parameters. |
options | UpdateRoutineOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
BigQueryRoutine | The updated routine. |
If the resource contains an ETag, it is used for optimistic concurrency validation.
UpdateRoutine(String, String, String, Routine, UpdateRoutineOptions)
public virtual BigQueryRoutine UpdateRoutine(string projectId, string datasetId, string routineId, Routine resource, UpdateRoutineOptions options = null)
Updates the specified routine to match the specified resource. This method just creates a Google.Apis.Bigquery.v2.Data.RoutineReference and delegates to UpdateRoutine(RoutineReference, Routine, UpdateRoutineOptions).
Parameters | |
---|---|
Name | Description |
projectId | String The project ID. Must not be null. |
datasetId | String The dataset ID. Must not be null. |
routineId | String The routine ID. Must not be null. |
resource | Google.Apis.Bigquery.v2.Data.Routine The routine resource representation to use for the update. All updatable fields will be updated. If this routine's Google.Apis.Bigquery.v2.Data.Routine.RoutineReference is specified, then it must be the same as the one obtained from the other parameters, else it will be set to the one obtained from the other parameters. |
options | UpdateRoutineOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
BigQueryRoutine | The updated routine. |
If the resource contains an ETag, it is used for optimistic concurrency validation.
UpdateRoutineAsync(RoutineReference, Routine, UpdateRoutineOptions, CancellationToken)
public virtual Task<BigQueryRoutine> UpdateRoutineAsync(RoutineReference routineReference, Routine resource, UpdateRoutineOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously updates the specified routine to match the specified resource.
Parameters | |
---|---|
Name | Description |
routineReference | Google.Apis.Bigquery.v2.Data.RoutineReference A fully-qualified identifier for the routine. Must not be null. |
resource | Google.Apis.Bigquery.v2.Data.Routine The routine resource representation to use for the update. All updatable fields will be updated. If this routine's Google.Apis.Bigquery.v2.Data.Routine.RoutineReference is specified, then it must be the same as the one obtained from the other parameters, else it will be set to the one obtained from the other parameters. |
options | UpdateRoutineOptions 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<BigQueryRoutine> | A task representing the asynchronous operation. When complete, the result is the updated routine. |
If the resource contains an ETag, it is used for optimistic concurrency validation.
UpdateRoutineAsync(String, String, Routine, UpdateRoutineOptions, CancellationToken)
public virtual Task<BigQueryRoutine> UpdateRoutineAsync(string datasetId, string routineId, Routine resource, UpdateRoutineOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously updates the specified routine within this client's project to match the specified resource. This method just creates a Google.Apis.Bigquery.v2.Data.RoutineReference and delegates to UpdateRoutineAsync(RoutineReference, Routine, UpdateRoutineOptions, CancellationToken).
Parameters | |
---|---|
Name | Description |
datasetId | String The dataset ID. Must not be null. |
routineId | String The routine ID. Must not be null. |
resource | Google.Apis.Bigquery.v2.Data.Routine The routine resource representation to use for the update. All updatable fields will be updated. If this routine's Google.Apis.Bigquery.v2.Data.Routine.RoutineReference is specified, then it must be the same as the one obtained from the other parameters, else it will be set to the one obtained from the other parameters. |
options | UpdateRoutineOptions 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<BigQueryRoutine> | A task representing the asynchronous operation. When complete, the result is the updated routine. |
If the resource contains an ETag, it is used for optimistic concurrency validation.
UpdateRoutineAsync(String, String, String, Routine, UpdateRoutineOptions, CancellationToken)
public virtual Task<BigQueryRoutine> UpdateRoutineAsync(string projectId, string datasetId, string routineId, Routine resource, UpdateRoutineOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously updates the specified routine to match the specified resource. This method just creates a Google.Apis.Bigquery.v2.Data.RoutineReference and delegates to UpdateRoutineAsync(RoutineReference, Routine, UpdateRoutineOptions, CancellationToken).
Parameters | |
---|---|
Name | Description |
projectId | String The project ID. Must not be null. |
datasetId | String The dataset ID. Must not be null. |
routineId | String The routine ID. Must not be null. |
resource | Google.Apis.Bigquery.v2.Data.Routine The routine resource representation to use for the update. All updatable fields will be updated. If this routine's Google.Apis.Bigquery.v2.Data.Routine.RoutineReference is specified, then it must be the same as the one obtained from the other parameters, else it will be set to the one obtained from the other parameters. |
options | UpdateRoutineOptions 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<BigQueryRoutine> | A task representing the asynchronous operation. When complete, the result is the updated routine. |
If the resource contains an ETag, it is used for optimistic concurrency validation.
UpdateTable(TableReference, Table, UpdateTableOptions)
public virtual BigQueryTable UpdateTable(TableReference tableReference, Table resource, UpdateTableOptions options = null)
Updates the specified table to match the specified resource.
Parameters | |
---|---|
Name | Description |
tableReference | Google.Apis.Bigquery.v2.Data.TableReference A fully-qualified identifier for the table. Must not be null. |
resource | Google.Apis.Bigquery.v2.Data.Table The table resource representation to use for the update. All updatable fields will be updated. |
options | UpdateTableOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
BigQueryTable | The updated table. |
If the resource contains an ETag, it is used for optimistic concurrency validation.
See UpdateTable for an example using an alternative overload.
UpdateTable(String, String, Table, UpdateTableOptions)
public virtual BigQueryTable UpdateTable(string datasetId, string tableId, Table resource, UpdateTableOptions options = null)
Updates the specified table within this client's project to match the specified resource. This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to UpdateTable(TableReference, Table, UpdateTableOptions).
Parameters | |
---|---|
Name | Description |
datasetId | String The dataset ID. Must not be null. |
tableId | String The table ID. Must not be null. |
resource | Google.Apis.Bigquery.v2.Data.Table The table resource representation to use for the update. All updatable fields will be updated. |
options | UpdateTableOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
BigQueryTable | The updated table. |
If the resource contains an ETag, it is used for optimistic concurrency validation.
BigQueryClient client = BigQueryClient.Create(projectId);
BigQueryTable table = client.GetTable(datasetId, tableId);
Table resource = table.Resource;
resource.FriendlyName = "Updated table";
// Alternatively, just call table.Update(). In either case,
// the etag in the resource will automatically be used for optimistic concurrency.
client.UpdateTable(datasetId, tableId, resource);
// Fetch just to make sure it's really changed...
BigQueryTable fetched = client.GetTable(datasetId, tableId);
Console.WriteLine($"Fetched table friendly name: {fetched.Resource.FriendlyName}");
UpdateTable(String, String, String, Table, UpdateTableOptions)
public virtual BigQueryTable UpdateTable(string projectId, string datasetId, string tableId, Table resource, UpdateTableOptions options = null)
Updates the specified table to match the specified resource. This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to UpdateTable(TableReference, Table, UpdateTableOptions).
Parameters | |
---|---|
Name | Description |
projectId | String The project ID. Must not be null. |
datasetId | String The dataset ID. Must not be null. |
tableId | String The table ID. Must not be null. |
resource | Google.Apis.Bigquery.v2.Data.Table The table resource representation to use for the update. All updatable fields will be updated. |
options | UpdateTableOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
BigQueryTable | The updated table. |
If the resource contains an ETag, it is used for optimistic concurrency validation.
See UpdateTable for an example using an alternative overload.
UpdateTableAsync(TableReference, Table, UpdateTableOptions, CancellationToken)
public virtual Task<BigQueryTable> UpdateTableAsync(TableReference tableReference, Table resource, UpdateTableOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously updates the specified table to match the specified resource.
Parameters | |
---|---|
Name | Description |
tableReference | Google.Apis.Bigquery.v2.Data.TableReference A fully-qualified identifier for the table. Must not be null. |
resource | Google.Apis.Bigquery.v2.Data.Table The table resource representation to use for the update. All updatable fields will be updated. |
options | UpdateTableOptions 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<BigQueryTable> | A task representing the asynchronous operation. When complete, the result is the updated table. |
If the resource contains an ETag, it is used for optimistic concurrency validation.
See UpdateTable for a synchronous example.
UpdateTableAsync(String, String, Table, UpdateTableOptions, CancellationToken)
public virtual Task<BigQueryTable> UpdateTableAsync(string datasetId, string tableId, Table resource, UpdateTableOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously updates the specified table within this client's project to match the specified resource. This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to UpdateTableAsync(TableReference, Table, UpdateTableOptions, CancellationToken).
Parameters | |
---|---|
Name | Description |
datasetId | String The dataset ID. Must not be null. |
tableId | String The table ID. Must not be null. |
resource | Google.Apis.Bigquery.v2.Data.Table The table resource representation to use for the update. All updatable fields will be updated. |
options | UpdateTableOptions 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<BigQueryTable> | A task representing the asynchronous operation. When complete, the result is the updated table. |
If the resource contains an ETag, it is used for optimistic concurrency validation.
See UpdateTable for a synchronous example.
UpdateTableAsync(String, String, String, Table, UpdateTableOptions, CancellationToken)
public virtual Task<BigQueryTable> UpdateTableAsync(string projectId, string datasetId, string tableId, Table resource, UpdateTableOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously updates the specified table to match the specified resource. This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to UpdateTableAsync(TableReference, Table, UpdateTableOptions, CancellationToken).
Parameters | |
---|---|
Name | Description |
projectId | String The project ID. Must not be null. |
datasetId | String The dataset ID. Must not be null. |
tableId | String The table ID. Must not be null. |
resource | Google.Apis.Bigquery.v2.Data.Table The table resource representation to use for the update. All updatable fields will be updated. |
options | UpdateTableOptions 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<BigQueryTable> | A task representing the asynchronous operation. When complete, the result is the updated table. |
If the resource contains an ETag, it is used for optimistic concurrency validation.
See UpdateTable for a synchronous example.
UploadAvro(TableReference, TableSchema, Stream, UploadAvroOptions)
public virtual BigQueryJob UploadAvro(TableReference tableReference, TableSchema schema, Stream input, UploadAvroOptions options = null)
Uploads a stream of Avro data to the specified table.
Parameters | |
---|---|
Name | Description |
tableReference | Google.Apis.Bigquery.v2.Data.TableReference A fully-qualified identifier for the table. Must not be null. |
schema | Google.Apis.Bigquery.v2.Data.TableSchema Unused. In earlier versions this specified the schema of the data, but it is now ignored as the schema is always inferred from the data. The parameter is only present for backward compatibility. |
input | Stream The stream of input data. Must not be null. |
options | UploadAvroOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
BigQueryJob | A data upload job. |
See UploadAvro for an example using an alternative overload.
UploadAvro(String, String, TableSchema, Stream, UploadAvroOptions)
public virtual BigQueryJob UploadAvro(string datasetId, string tableId, TableSchema schema, Stream input, UploadAvroOptions options = null)
Uploads a stream of Avro data to the specified table within this client's project. This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to UploadAvro(TableReference, TableSchema, Stream, UploadAvroOptions).
Parameters | |
---|---|
Name | Description |
datasetId | String The dataset ID. Must not be null. |
tableId | String The table ID. Must not be null. |
schema | Google.Apis.Bigquery.v2.Data.TableSchema Unused. In earlier versions this specified the schema of the data, but it is now ignored as the schema is always inferred from the data. The parameter is only present for backward compatibility. |
input | Stream The stream of input data. Must not be null. |
options | UploadAvroOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
BigQueryJob | A data upload job. |
BigQueryClient client = BigQueryClient.Create(projectId);
// This example creates a new table. Any schema provided is ignored, as Avro
// is self-describing. (The parameter only exists for legacy reasons.)
BigQueryJob job = client.UploadAvro(datasetId, tableId, null, stream);
// Use the job to find out when the data has finished being inserted into the table,
// report errors etc.
UploadAvro(String, String, String, TableSchema, Stream, UploadAvroOptions)
public virtual BigQueryJob UploadAvro(string projectId, string datasetId, string tableId, TableSchema schema, Stream input, UploadAvroOptions options = null)
Uploads a stream of Avro data to the specified table. This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to UploadAvro(TableReference, TableSchema, Stream, UploadAvroOptions).
Parameters | |
---|---|
Name | Description |
projectId | String The project ID. Must not be null. |
datasetId | String The dataset ID. Must not be null. |
tableId | String The table ID. Must not be null. |
schema | Google.Apis.Bigquery.v2.Data.TableSchema Unused. In earlier versions this specified the schema of the data, but it is now ignored as the schema is always inferred from the data. The parameter is only present for backward compatibility. |
input | Stream The stream of input data. Must not be null. |
options | UploadAvroOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
BigQueryJob | A data upload job. |
See UploadAvro for an example using an alternative overload.
UploadAvroAsync(TableReference, TableSchema, Stream, UploadAvroOptions, CancellationToken)
public virtual Task<BigQueryJob> UploadAvroAsync(TableReference tableReference, TableSchema schema, Stream input, UploadAvroOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously uploads a stream of Avro data to the specified table.
Parameters | |
---|---|
Name | Description |
tableReference | Google.Apis.Bigquery.v2.Data.TableReference A fully-qualified identifier for the table. Must not be null. |
schema | Google.Apis.Bigquery.v2.Data.TableSchema Unused. In earlier versions this specified the schema of the data, but it is now ignored as the schema is always inferred from the data. The parameter is only present for backward compatibility. |
input | Stream The stream of input data. Must not be null. |
options | UploadAvroOptions 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 a data upload job. |
See UploadAvro for a synchronous example.
UploadAvroAsync(String, String, TableSchema, Stream, UploadAvroOptions, CancellationToken)
public virtual Task<BigQueryJob> UploadAvroAsync(string datasetId, string tableId, TableSchema schema, Stream input, UploadAvroOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously uploads a stream of Avro data to the specified table within this client's project. This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to UploadAvroAsync(TableReference, TableSchema, Stream, UploadAvroOptions, CancellationToken).
Parameters | |
---|---|
Name | Description |
datasetId | String The dataset ID. Must not be null. |
tableId | String The table ID. Must not be null. |
schema | Google.Apis.Bigquery.v2.Data.TableSchema Unused. In earlier versions this specified the schema of the data, but it is now ignored as the schema is always inferred from the data. The parameter is only present for backward compatibility. |
input | Stream The stream of input data. Must not be null. |
options | UploadAvroOptions 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 a data upload job. |
See UploadAvro for a synchronous example.
UploadAvroAsync(String, String, String, TableSchema, Stream, UploadAvroOptions, CancellationToken)
public virtual Task<BigQueryJob> UploadAvroAsync(string projectId, string datasetId, string tableId, TableSchema schema, Stream input, UploadAvroOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously uploads a stream of Avro data to the specified table. This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to UploadAvroAsync(TableReference, TableSchema, Stream, UploadAvroOptions, CancellationToken).
Parameters | |
---|---|
Name | Description |
projectId | String The project ID. Must not be null. |
datasetId | String The dataset ID. Must not be null. |
tableId | String The table ID. Must not be null. |
schema | Google.Apis.Bigquery.v2.Data.TableSchema Unused. In earlier versions this specified the schema of the data, but it is now ignored as the schema is always inferred from the data. The parameter is only present for backward compatibility. |
input | Stream The stream of input data. Must not be null. |
options | UploadAvroOptions 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 a data upload job. |
See UploadAvro for a synchronous example.
UploadCsv(TableReference, TableSchema, Stream, UploadCsvOptions)
public virtual BigQueryJob UploadCsv(TableReference tableReference, TableSchema schema, Stream input, UploadCsvOptions options = null)
Uploads a stream of CSV data to the specified table.
Parameters | |
---|---|
Name | Description |
tableReference | Google.Apis.Bigquery.v2.Data.TableReference A fully-qualified identifier for the table. Must not be null. |
schema | Google.Apis.Bigquery.v2.Data.TableSchema The schema of the data, or null for the schema to be loaded from the destination table or inferred (based on |
input | Stream The stream of input data. Must not be null. |
options | UploadCsvOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
BigQueryJob | A data upload job. |
The schema can come from three places: it can be specified by schema
,
it can be retrieved from the destination table if that already exists, or it can be inferred by the server.
If schema
is null and the Autodetect of options
is not set to true,
it is expected that the table already exists, and its schema is loaded automatically.
See UploadCsv for an example using an alternative overload.
UploadCsv(String, String, TableSchema, Stream, UploadCsvOptions)
public virtual BigQueryJob UploadCsv(string datasetId, string tableId, TableSchema schema, Stream input, UploadCsvOptions options = null)
Uploads a stream of CSV data to the specified table within this client's project. This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to UploadCsv(TableReference, TableSchema, Stream, UploadCsvOptions).
Parameters | |
---|---|
Name | Description |
datasetId | String The dataset ID. Must not be null. |
tableId | String The table ID. Must not be null. |
schema | Google.Apis.Bigquery.v2.Data.TableSchema The schema of the data, or null for the schema to be loaded from the destination table or inferred (based on |
input | Stream The stream of input data. Must not be null. |
options | UploadCsvOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
BigQueryJob | A data upload job. |
The schema can come from three places: it can be specified by schema
,
it can be retrieved from the destination table if that already exists, or it can be inferred by the server.
If schema
is null and the Autodetect of options
is not set to true,
it is expected that the table already exists, and its schema is loaded automatically.
BigQueryClient client = BigQueryClient.Create(projectId);
string[] csvRows =
{
"player,score,level,game_started",
"Tim,5000,3,2014-08-19T12:41:35.220Z",
"Holly,6000,4,2014-08-03T08:45:35.123Z",
"Jane,2402,1,2015-01-20T10:13:35.059Z"
};
// Normally we'd be uploading from a file or similar. Any readable stream can be used.
MemoryStream stream = new MemoryStream(Encoding.UTF8.GetBytes(string.Join("\n", csvRows)));
// This example uploads data to an existing table. If the upload will create a new table
// or if the schema in the CSV isn't identical to the schema in the table (for example if the
// columns are in a different order), create a schema to pass into the call, or set
// options.Autodetect to true.
TableSchema schema = null;
BigQueryJob job = client.UploadCsv(datasetId, tableId, schema, stream,
// Our sample data has a header row, so we need to skip it.
new UploadCsvOptions { SkipLeadingRows = 1 });
// Use the job to find out when the data has finished being inserted into the table,
// report errors etc.
UploadCsv(String, String, String, TableSchema, Stream, UploadCsvOptions)
public virtual BigQueryJob UploadCsv(string projectId, string datasetId, string tableId, TableSchema schema, Stream input, UploadCsvOptions options = null)
Uploads a stream of CSV data to the specified table. This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to UploadCsv(TableReference, TableSchema, Stream, UploadCsvOptions).
Parameters | |
---|---|
Name | Description |
projectId | String The project ID. Must not be null. |
datasetId | String The dataset ID. Must not be null. |
tableId | String The table ID. Must not be null. |
schema | Google.Apis.Bigquery.v2.Data.TableSchema The schema of the data, or null for the schema to be loaded from the destination table or inferred (based on |
input | Stream The stream of input data. Must not be null. |
options | UploadCsvOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
BigQueryJob | A data upload job. |
The schema can come from three places: it can be specified by schema
,
it can be retrieved from the destination table if that already exists, or it can be inferred by the server.
If schema
is null and the Autodetect of options
is not set to true,
it is expected that the table already exists, and its schema is loaded automatically.
See UploadCsv for an example using an alternative overload.
UploadCsvAsync(TableReference, TableSchema, Stream, UploadCsvOptions, CancellationToken)
public virtual Task<BigQueryJob> UploadCsvAsync(TableReference tableReference, TableSchema schema, Stream input, UploadCsvOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously uploads a stream of CSV data to the specified table.
Parameters | |
---|---|
Name | Description |
tableReference | Google.Apis.Bigquery.v2.Data.TableReference A fully-qualified identifier for the table. Must not be null. |
schema | Google.Apis.Bigquery.v2.Data.TableSchema The schema of the data, or null for the schema to be loaded from the destination table or inferred (based on |
input | Stream The stream of input data. Must not be null. |
options | UploadCsvOptions 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 a data upload job. |
The schema can come from three places: it can be specified by schema
,
it can be retrieved from the destination table if that already exists, or it can be inferred by the server.
If schema
is null and the Autodetect of options
is not set to true,
it is expected that the table already exists, and its schema is loaded automatically.
See UploadCsvAsync for an example using an alternative overload.
UploadCsvAsync(String, String, TableSchema, Stream, UploadCsvOptions, CancellationToken)
public virtual Task<BigQueryJob> UploadCsvAsync(string datasetId, string tableId, TableSchema schema, Stream input, UploadCsvOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously uploads a stream of CSV data to the specified table within this client's project. This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to UploadCsvAsync(TableReference, TableSchema, Stream, UploadCsvOptions, CancellationToken).
Parameters | |
---|---|
Name | Description |
datasetId | String The dataset ID. Must not be null. |
tableId | String The table ID. Must not be null. |
schema | Google.Apis.Bigquery.v2.Data.TableSchema The schema of the data, or null for the schema to be loaded from the destination table or inferred (based on |
input | Stream The stream of input data. Must not be null. |
options | UploadCsvOptions 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 a data upload job. |
The schema can come from three places: it can be specified by schema
,
it can be retrieved from the destination table if that already exists, or it can be inferred by the server.
If schema
is null and the Autodetect of options
is not set to true,
it is expected that the table already exists, and its schema is loaded automatically.
BigQueryClient client = await BigQueryClient.CreateAsync(projectId);
string[] csvRows =
{
"player,score,level,game_started",
"Tim,5000,3,2014-08-19T12:41:35.220Z",
"Holly,6000,4,2014-08-03T08:45:35.123Z",
"Jane,2402,1,2015-01-20T10:13:35.059Z"
};
// Normally we'd be uploading from a file or similar. Any readable stream can be used.
MemoryStream stream = new MemoryStream(Encoding.UTF8.GetBytes(string.Join("\n", csvRows)));
// This example uploads data to an existing table. If the upload will create a new table
// or if the schema in the CSV isn't identical to the schema in the table (for example if the
// columns are in a different order), create a schema to pass into the call.
TableSchema schema = null;
BigQueryJob job = await client.UploadCsvAsync(datasetId, tableId, schema, stream,
// Our sample data has a header row, so we need to skip it.
new UploadCsvOptions { SkipLeadingRows = 1 });
// Use the job to find out when the data has finished being inserted into the table,
// report errors etc.
UploadCsvAsync(String, String, String, TableSchema, Stream, UploadCsvOptions, CancellationToken)
public virtual Task<BigQueryJob> UploadCsvAsync(string projectId, string datasetId, string tableId, TableSchema schema, Stream input, UploadCsvOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously uploads a stream of CSV data to the specified table. This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to UploadCsvAsync(TableReference, TableSchema, Stream, UploadCsvOptions, CancellationToken).
Parameters | |
---|---|
Name | Description |
projectId | String The project ID. Must not be null. |
datasetId | String The dataset ID. Must not be null. |
tableId | String The table ID. Must not be null. |
schema | Google.Apis.Bigquery.v2.Data.TableSchema The schema of the data, or null for the schema to be loaded from the destination table or inferred (based on |
input | Stream The stream of input data. Must not be null. |
options | UploadCsvOptions 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 a data upload job. |
The schema can come from three places: it can be specified by schema
,
it can be retrieved from the destination table if that already exists, or it can be inferred by the server.
If schema
is null and the Autodetect of options
is not set to true,
it is expected that the table already exists, and its schema is loaded automatically.
See UploadCsvAsync for an example using an alternative overload.
UploadJson(TableReference, TableSchema, IEnumerable<String>, UploadJsonOptions)
public virtual BigQueryJob UploadJson(TableReference tableReference, TableSchema schema, IEnumerable<string> rows, UploadJsonOptions options = null)
Uploads a sequence of JSON rows to the specified table.
Parameters | |
---|---|
Name | Description |
tableReference | Google.Apis.Bigquery.v2.Data.TableReference A fully-qualified identifier for the table. Must not be null. |
schema | Google.Apis.Bigquery.v2.Data.TableSchema The schema of the data, or null for the schema to be loaded from the destination table or inferred (based on |
rows | IEnumerable<String> The sequence of JSON strings to upload. Must not be null, and must not contain null elements. |
options | UploadJsonOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
BigQueryJob | A data upload job. |
Each element of rows
is converted into a single line of text by replacing carriage returns and line
feeds with spaces. This is safe as they cannot exist within well-formed JSON keys or values, and simply means that the
original JSON can be formatted however you choose.
The schema can come from three places: it can be specified by schema
,
it can be retrieved from the destination table if that already exists, or it can be inferred by the server.
If schema
is null and the Autodetect of options
is not set to true,
it is expected that the table already exists, and its schema is loaded automatically.
See UploadJson for an example using an alternative overload.
UploadJson(TableReference, TableSchema, Stream, UploadJsonOptions)
public virtual BigQueryJob UploadJson(TableReference tableReference, TableSchema schema, Stream input, UploadJsonOptions options = null)
Uploads a stream of JSON data to the specified table.
Parameters | |
---|---|
Name | Description |
tableReference | Google.Apis.Bigquery.v2.Data.TableReference A fully-qualified identifier for the table. Must not be null. |
schema | Google.Apis.Bigquery.v2.Data.TableSchema The schema of the data, or null for the schema to be loaded from the destination table or inferred (based on |
input | Stream The stream of input data. Must not be null. |
options | UploadJsonOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
BigQueryJob | A data upload job. |
The schema can come from three places: it can be specified by schema
,
it can be retrieved from the destination table if that already exists, or it can be inferred by the server.
If schema
is null and the Autodetect of options
is not set to true,
it is expected that the table already exists, and its schema is loaded automatically.
See UploadJson for an example using an alternative overload.
UploadJson(String, String, TableSchema, IEnumerable<String>, UploadJsonOptions)
public virtual BigQueryJob UploadJson(string datasetId, string tableId, TableSchema schema, IEnumerable<string> rows, UploadJsonOptions options = null)
Uploads a sequence of JSON rows to the specified table within this client's project. This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to UploadJson(TableReference, TableSchema, IEnumerable<String>, UploadJsonOptions).
Parameters | |
---|---|
Name | Description |
datasetId | String The dataset ID. Must not be null. |
tableId | String The table ID. Must not be null. |
schema | Google.Apis.Bigquery.v2.Data.TableSchema The schema of the data, or null for the schema to be loaded from the destination table or inferred (based on |
rows | IEnumerable<String> The sequence of JSON strings to upload. Must not be null, and must not contain null elements. |
options | UploadJsonOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
BigQueryJob | A data upload job. |
Each element of rows
is converted into a single line of text by replacing carriage returns and line
feeds with spaces. This is safe as they cannot exist within well-formed JSON keys or values, and simply means that the
original JSON can be formatted however you choose.
The schema can come from three places: it can be specified by schema
,
it can be retrieved from the destination table if that already exists, or it can be inferred by the server.
If schema
is null and the Autodetect of options
is not set to true,
it is expected that the table already exists, and its schema is loaded automatically.
BigQueryClient client = BigQueryClient.Create(projectId);
// Note that there's a single line per JSON object. This is not a JSON array.
IEnumerable<string> jsonRows = new string[]
{
"{ 'player': 'Jean', 'score': 500, 'level': 1, 'game_started': '2012-08-19 12:41:35.220' }",
"{ 'player': 'Joe', 'score': 705, 'level': 1, 'game_started': '2014-01-01 08:30:35.000' }",
}.Select(row => row.Replace('\'', '"')); // Simple way of representing C# in JSON to avoid escaping " everywhere.
// This example uploads data to an existing table. If the upload will create a new table
// or if the schema in the JSON isn't identical to the schema in the table,
// create a schema to pass into the call.
TableSchema schema = null;
BigQueryJob job = client.UploadJson(datasetId, tableId, schema, jsonRows);
// Use the job to find out when the data has finished being inserted into the table,
// report errors etc.
UploadJson(String, String, TableSchema, Stream, UploadJsonOptions)
public virtual BigQueryJob UploadJson(string datasetId, string tableId, TableSchema schema, Stream input, UploadJsonOptions options = null)
Uploads a stream of JSON data to the specified table within this client's project. This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to UploadJson(TableReference, TableSchema, Stream, UploadJsonOptions).
Parameters | |
---|---|
Name | Description |
datasetId | String The dataset ID. Must not be null. |
tableId | String The table ID. Must not be null. |
schema | Google.Apis.Bigquery.v2.Data.TableSchema The schema of the data, or null for the schema to be loaded from the destination table or inferred (based on |
input | Stream The stream of input data. Must not be null. |
options | UploadJsonOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
BigQueryJob | A data upload job. |
The schema can come from three places: it can be specified by schema
,
it can be retrieved from the destination table if that already exists, or it can be inferred by the server.
If schema
is null and the Autodetect of options
is not set to true,
it is expected that the table already exists, and its schema is loaded automatically.
BigQueryClient client = BigQueryClient.Create(projectId);
// Note that there's a single line per JSON object. This is not a JSON array.
IEnumerable<string> jsonRows = new string[]
{
"{ 'player': 'John', 'score': 50, 'level': 1, 'game_started': '2014-08-19 12:41:35.220' }",
"{ 'player': 'Zoe', 'score': 605, 'level': 1, 'game_started': '2016-01-01 08:30:35.000' }",
}.Select(row => row.Replace('\'', '"')); // Simple way of representing C# in JSON to avoid escaping " everywhere.
// Normally we'd be uploading from a file or similar. Any readable stream can be used.
MemoryStream stream = new MemoryStream(Encoding.UTF8.GetBytes(string.Join("\n", jsonRows)));
// This example uploads data to an existing table. If the upload will create a new table
// or if the schema in the JSON isn't identical to the schema in the table,
// create a schema to pass into the call, or set options.Autodetect to true.
TableSchema schema = null;
BigQueryJob job = client.UploadJson(datasetId, tableId, schema, stream);
// Use the job to find out when the data has finished being inserted into the table,
// report errors etc.
UploadJson(String, String, String, TableSchema, IEnumerable<String>, UploadJsonOptions)
public virtual BigQueryJob UploadJson(string projectId, string datasetId, string tableId, TableSchema schema, IEnumerable<string> rows, UploadJsonOptions options = null)
Uploads a sequence of JSON rows to the specified table. This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to UploadJson(TableReference, TableSchema, IEnumerable<String>, UploadJsonOptions).
Parameters | |
---|---|
Name | Description |
projectId | String The project ID. Must not be null. |
datasetId | String The dataset ID. Must not be null. |
tableId | String The table ID. Must not be null. |
schema | Google.Apis.Bigquery.v2.Data.TableSchema The schema of the data, or null for the schema to be loaded from the destination table or inferred (based on |
rows | IEnumerable<String> The sequence of JSON strings to upload. Must not be null, and must not contain null elements. |
options | UploadJsonOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
BigQueryJob | A data upload job. |
Each element of rows
is converted into a single line of text by replacing carriage returns and line
feeds with spaces. This is safe as they cannot exist within well-formed JSON keys or values, and simply means that the
original JSON can be formatted however you choose.
The schema can come from three places: it can be specified by schema
,
it can be retrieved from the destination table if that already exists, or it can be inferred by the server.
If schema
is null and the Autodetect of options
is not set to true,
it is expected that the table already exists, and its schema is loaded automatically.
See UploadJson for an example using an alternative overload.
UploadJson(String, String, String, TableSchema, Stream, UploadJsonOptions)
public virtual BigQueryJob UploadJson(string projectId, string datasetId, string tableId, TableSchema schema, Stream input, UploadJsonOptions options = null)
Uploads a stream of JSON data to the specified table. This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to UploadJson(TableReference, TableSchema, Stream, UploadJsonOptions).
Parameters | |
---|---|
Name | Description |
projectId | String The project ID. Must not be null. |
datasetId | String The dataset ID. Must not be null. |
tableId | String The table ID. Must not be null. |
schema | Google.Apis.Bigquery.v2.Data.TableSchema The schema of the data, or null for the schema to be loaded from the destination table or inferred (based on |
input | Stream The stream of input data. Must not be null. |
options | UploadJsonOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
BigQueryJob | A data upload job. |
The schema can come from three places: it can be specified by schema
,
it can be retrieved from the destination table if that already exists, or it can be inferred by the server.
If schema
is null and the Autodetect of options
is not set to true,
it is expected that the table already exists, and its schema is loaded automatically.
See UploadJson for an example using an alternative overload.
UploadJsonAsync(TableReference, TableSchema, IEnumerable<String>, UploadJsonOptions, CancellationToken)
public virtual Task<BigQueryJob> UploadJsonAsync(TableReference tableReference, TableSchema schema, IEnumerable<string> rows, UploadJsonOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously uploads a sequence of JSON rows to the specified table.
Parameters | |
---|---|
Name | Description |
tableReference | Google.Apis.Bigquery.v2.Data.TableReference A fully-qualified identifier for the table. Must not be null. |
schema | Google.Apis.Bigquery.v2.Data.TableSchema The schema of the data, or null for the schema to be loaded from the destination table or inferred (based on |
rows | IEnumerable<String> The sequence of JSON strings to upload. Must not be null, and must not contain null elements. |
options | UploadJsonOptions 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 a data upload job. |
Each element of rows
is converted into a single line of text by replacing carriage returns and line
feeds with spaces. This is safe as they cannot exist within well-formed JSON keys or values, and simply means that the
original JSON can be formatted however you choose.
The schema can come from three places: it can be specified by schema
,
it can be retrieved from the destination table if that already exists, or it can be inferred by the server.
If schema
is null and the Autodetect of options
is not set to true,
it is expected that the table already exists, and its schema is loaded automatically.
See UploadJson for an example using an alternative overload.
UploadJsonAsync(TableReference, TableSchema, Stream, UploadJsonOptions, CancellationToken)
public virtual Task<BigQueryJob> UploadJsonAsync(TableReference tableReference, TableSchema schema, Stream input, UploadJsonOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously uploads a stream of JSON data to the specified table.
Parameters | |
---|---|
Name | Description |
tableReference | Google.Apis.Bigquery.v2.Data.TableReference A fully-qualified identifier for the table. Must not be null. |
schema | Google.Apis.Bigquery.v2.Data.TableSchema The schema of the data, or null for the schema to be loaded from the destination table or inferred (based on |
input | Stream The stream of input data. Must not be null. |
options | UploadJsonOptions 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 a data upload job. |
The schema can come from three places: it can be specified by schema
,
it can be retrieved from the destination table if that already exists, or it can be inferred by the server.
If schema
is null and the Autodetect of options
is not set to true,
it is expected that the table already exists, and its schema is loaded automatically.
See UploadJson for an example using an alternative overload.
UploadJsonAsync(String, String, TableSchema, IEnumerable<String>, UploadJsonOptions, CancellationToken)
public virtual Task<BigQueryJob> UploadJsonAsync(string datasetId, string tableId, TableSchema schema, IEnumerable<string> rows, UploadJsonOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously uploads a sequence of JSON rows to the specified table within this client's project. This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to UploadJsonAsync(TableReference, TableSchema, IEnumerable<String>, UploadJsonOptions, CancellationToken).
Parameters | |
---|---|
Name | Description |
datasetId | String The dataset ID. Must not be null. |
tableId | String The table ID. Must not be null. |
schema | Google.Apis.Bigquery.v2.Data.TableSchema The schema of the data, or null for the schema to be loaded from the destination table or inferred (based on |
rows | IEnumerable<String> The sequence of JSON strings to upload. Must not be null, and must not contain null elements. |
options | UploadJsonOptions 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 a data upload job. |
Each element of rows
is converted into a single line of text by replacing carriage returns and line
feeds with spaces. This is safe as they cannot exist within well-formed JSON keys or values, and simply means that the
original JSON can be formatted however you choose.
The schema can come from three places: it can be specified by schema
,
it can be retrieved from the destination table if that already exists, or it can be inferred by the server.
If schema
is null and the Autodetect of options
is not set to true,
it is expected that the table already exists, and its schema is loaded automatically.
BigQueryClient client = await BigQueryClient.CreateAsync(projectId);
// Note that there's a single line per JSON object. This is not a JSON array.
IEnumerable<string> jsonRows = new string[]
{
"{ 'player': 'Jean', 'score': 500, 'level': 1, 'game_started': '2012-08-19 12:41:35.220' }",
"{ 'player': 'Joe', 'score': 705, 'level': 1, 'game_started': '2014-01-01 08:30:35.000' }",
}.Select(row => row.Replace('\'', '"')); // Simple way of representing C# in JSON to avoid escaping " everywhere.
// This example uploads data to an existing table. If the upload will create a new table
// or if the schema in the JSON isn't identical to the schema in the table,
// create a schema to pass into the call.
TableSchema schema = null;
BigQueryJob job = await client.UploadJsonAsync(datasetId, tableId, schema, jsonRows);
// Use the job to find out when the data has finished being inserted into the table,
// report errors etc.
UploadJsonAsync(String, String, TableSchema, Stream, UploadJsonOptions, CancellationToken)
public virtual Task<BigQueryJob> UploadJsonAsync(string datasetId, string tableId, TableSchema schema, Stream input, UploadJsonOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously uploads a stream of JSON data to the specified table within this client's project. This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to UploadJsonAsync(TableReference, TableSchema, Stream, UploadJsonOptions, CancellationToken).
Parameters | |
---|---|
Name | Description |
datasetId | String The dataset ID. Must not be null. |
tableId | String The table ID. Must not be null. |
schema | Google.Apis.Bigquery.v2.Data.TableSchema The schema of the data, or null for the schema to be loaded from the destination table or inferred (based on |
input | Stream The stream of input data. Must not be null. |
options | UploadJsonOptions 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 a data upload job. |
The schema can come from three places: it can be specified by schema
,
it can be retrieved from the destination table if that already exists, or it can be inferred by the server.
If schema
is null and the Autodetect of options
is not set to true,
it is expected that the table already exists, and its schema is loaded automatically.
BigQueryClient client = await BigQueryClient.CreateAsync(projectId);
// Note that there's a single line per JSON object. This is not a JSON array.
IEnumerable<string> jsonRows = new string[]
{
"{ 'player': 'John', 'score': 50, 'level': 1, 'game_started': '2014-08-19 12:41:35.220' }",
"{ 'player': 'Zoe', 'score': 605, 'level': 1, 'game_started': '2016-01-01 08:30:35.000' }",
}.Select(row => row.Replace('\'', '"')); // Simple way of representing C# in JSON to avoid escaping " everywhere.
// Normally we'd be uploading from a file or similar. Any readable stream can be used.
MemoryStream stream = new MemoryStream(Encoding.UTF8.GetBytes(string.Join("\n", jsonRows)));
// This example uploads data to an existing table. If the upload will create a new table
// or if the schema in the JSON isn't identical to the schema in the table,
// create a schema to pass into the call.
TableSchema schema = null;
BigQueryJob job = await client.UploadJsonAsync(datasetId, tableId, schema, stream);
// Use the job to find out when the data has finished being inserted into the table,
// report errors etc.
UploadJsonAsync(String, String, String, TableSchema, IEnumerable<String>, UploadJsonOptions, CancellationToken)
public virtual Task<BigQueryJob> UploadJsonAsync(string projectId, string datasetId, string tableId, TableSchema schema, IEnumerable<string> rows, UploadJsonOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously uploads a sequence of JSON rows to the specified table. This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to UploadJsonAsync(TableReference, TableSchema, IEnumerable<String>, UploadJsonOptions, CancellationToken).
Parameters | |
---|---|
Name | Description |
projectId | String The project ID. Must not be null. |
datasetId | String The dataset ID. Must not be null. |
tableId | String The table ID. Must not be null. |
schema | Google.Apis.Bigquery.v2.Data.TableSchema The schema of the data, or null for the schema to be loaded from the destination table or inferred (based on |
rows | IEnumerable<String> The sequence of JSON strings to upload. Must not be null, and must not contain null elements. |
options | UploadJsonOptions 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 a data upload job. |
Each element of rows
is converted into a single line of text by replacing carriage returns and line
feeds with spaces. This is safe as they cannot exist within well-formed JSON keys or values, and simply means that the
original JSON can be formatted however you choose.
The schema can come from three places: it can be specified by schema
,
it can be retrieved from the destination table if that already exists, or it can be inferred by the server.
If schema
is null and the Autodetect of options
is not set to true,
it is expected that the table already exists, and its schema is loaded automatically.
See UploadJson for an example using an alternative overload.
UploadJsonAsync(String, String, String, TableSchema, Stream, UploadJsonOptions, CancellationToken)
public virtual Task<BigQueryJob> UploadJsonAsync(string projectId, string datasetId, string tableId, TableSchema schema, Stream input, UploadJsonOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously uploads a stream of JSON data to the specified table. This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to UploadJsonAsync(TableReference, TableSchema, Stream, UploadJsonOptions, CancellationToken).
Parameters | |
---|---|
Name | Description |
projectId | String The project ID. Must not be null. |
datasetId | String The dataset ID. Must not be null. |
tableId | String The table ID. Must not be null. |
schema | Google.Apis.Bigquery.v2.Data.TableSchema The schema of the data, or null for the schema to be loaded from the destination table or inferred (based on |
input | Stream The stream of input data. Must not be null. |
options | UploadJsonOptions 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 a data upload job. |
The schema can come from three places: it can be specified by schema
,
it can be retrieved from the destination table if that already exists, or it can be inferred by the server.
If schema
is null and the Autodetect of options
is not set to true,
it is expected that the table already exists, and its schema is loaded automatically.
See UploadJson for an example using an alternative overload.
UploadOrc(TableReference, Stream, UploadOrcOptions)
public virtual BigQueryJob UploadOrc(TableReference tableReference, Stream input, UploadOrcOptions options = null)
Uploads a stream of ORC data to the specified table.
Parameters | |
---|---|
Name | Description |
tableReference | Google.Apis.Bigquery.v2.Data.TableReference A fully-qualified identifier for the table. Must not be null. |
input | Stream The stream of input data. Must not be null. |
options | UploadOrcOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
BigQueryJob | A data upload job. |
See UploadOrc for an example using an alternative overload.
UploadOrc(String, String, Stream, UploadOrcOptions)
public virtual BigQueryJob UploadOrc(string datasetId, string tableId, Stream input, UploadOrcOptions options = null)
Uploads a stream of ORC data to the specified table within this client's project. This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to UploadOrc(TableReference, Stream, UploadOrcOptions).
Parameters | |
---|---|
Name | Description |
datasetId | String The dataset ID. Must not be null. |
tableId | String The table ID. Must not be null. |
input | Stream The stream of input data. Must not be null. |
options | UploadOrcOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
BigQueryJob | A data upload job. |
BigQueryClient client = BigQueryClient.Create(projectId);
// This example creates a new table.
BigQueryJob job = client.UploadOrc(datasetId, tableId, stream);
// Use the job to find out when the data has finished being inserted into the table,
// report errors etc.
UploadOrc(String, String, String, Stream, UploadOrcOptions)
public virtual BigQueryJob UploadOrc(string projectId, string datasetId, string tableId, Stream input, UploadOrcOptions options = null)
Uploads a stream of ORC data to the specified table. This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to UploadOrc(TableReference, Stream, UploadOrcOptions).
Parameters | |
---|---|
Name | Description |
projectId | String The project ID. Must not be null. |
datasetId | String The dataset ID. Must not be null. |
tableId | String The table ID. Must not be null. |
input | Stream The stream of input data. Must not be null. |
options | UploadOrcOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
BigQueryJob | A data upload job. |
See UploadOrc for an example using an alternative overload.
UploadOrcAsync(TableReference, Stream, UploadOrcOptions, CancellationToken)
public virtual Task<BigQueryJob> UploadOrcAsync(TableReference tableReference, Stream input, UploadOrcOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously uploads a stream of ORC data to the specified table.
Parameters | |
---|---|
Name | Description |
tableReference | Google.Apis.Bigquery.v2.Data.TableReference A fully-qualified identifier for the table. Must not be null. |
input | Stream The stream of input data. Must not be null. |
options | UploadOrcOptions 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 a data upload job. |
See UploadOrc for a synchronous example.
UploadOrcAsync(String, String, Stream, UploadOrcOptions, CancellationToken)
public virtual Task<BigQueryJob> UploadOrcAsync(string datasetId, string tableId, Stream input, UploadOrcOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously uploads a stream of ORC data to the specified table within this client's project. This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to UploadOrcAsync(TableReference, Stream, UploadOrcOptions, CancellationToken).
Parameters | |
---|---|
Name | Description |
datasetId | String The dataset ID. Must not be null. |
tableId | String The table ID. Must not be null. |
input | Stream The stream of input data. Must not be null. |
options | UploadOrcOptions 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 a data upload job. |
See UploadOrc for a synchronous example.
UploadOrcAsync(String, String, String, Stream, UploadOrcOptions, CancellationToken)
public virtual Task<BigQueryJob> UploadOrcAsync(string projectId, string datasetId, string tableId, Stream input, UploadOrcOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously uploads a stream of ORC data to the specified table. This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to UploadOrcAsync(TableReference, Stream, UploadOrcOptions, CancellationToken).
Parameters | |
---|---|
Name | Description |
projectId | String The project ID. Must not be null. |
datasetId | String The dataset ID. Must not be null. |
tableId | String The table ID. Must not be null. |
input | Stream The stream of input data. Must not be null. |
options | UploadOrcOptions 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 a data upload job. |
See UploadOrc for a synchronous example.
UploadParquet(TableReference, Stream, UploadParquetOptions)
public virtual BigQueryJob UploadParquet(TableReference tableReference, Stream input, UploadParquetOptions options = null)
Uploads a stream of Parquet data to the specified table.
Parameters | |
---|---|
Name | Description |
tableReference | Google.Apis.Bigquery.v2.Data.TableReference A fully-qualified identifier for the table. Must not be null. |
input | Stream The stream of input data. Must not be null. |
options | UploadParquetOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
BigQueryJob | A data upload job. |
See UploadParquet for an example using an alternative overload.
UploadParquet(String, String, Stream, UploadParquetOptions)
public virtual BigQueryJob UploadParquet(string datasetId, string tableId, Stream input, UploadParquetOptions options = null)
Uploads a stream of Parquet data to the specified table within this client's project. This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to UploadParquet(TableReference, Stream, UploadParquetOptions).
Parameters | |
---|---|
Name | Description |
datasetId | String The dataset ID. Must not be null. |
tableId | String The table ID. Must not be null. |
input | Stream The stream of input data. Must not be null. |
options | UploadParquetOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
BigQueryJob | A data upload job. |
BigQueryClient client = BigQueryClient.Create(projectId);
// This example creates a new table.
BigQueryJob job = client.UploadParquet(datasetId, tableId, stream);
// Use the job to find out when the data has finished being inserted into the table,
// report errors etc.
UploadParquet(String, String, String, Stream, UploadParquetOptions)
public virtual BigQueryJob UploadParquet(string projectId, string datasetId, string tableId, Stream input, UploadParquetOptions options = null)
Uploads a stream of Parquet data to the specified table. This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to UploadParquet(TableReference, Stream, UploadParquetOptions).
Parameters | |
---|---|
Name | Description |
projectId | String The project ID. Must not be null. |
datasetId | String The dataset ID. Must not be null. |
tableId | String The table ID. Must not be null. |
input | Stream The stream of input data. Must not be null. |
options | UploadParquetOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
BigQueryJob | A data upload job. |
See UploadParquet for an example using an alternative overload.
UploadParquetAsync(TableReference, Stream, UploadParquetOptions, CancellationToken)
public virtual Task<BigQueryJob> UploadParquetAsync(TableReference tableReference, Stream input, UploadParquetOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously uploads a stream of Parquet data to the specified table.
Parameters | |
---|---|
Name | Description |
tableReference | Google.Apis.Bigquery.v2.Data.TableReference A fully-qualified identifier for the table. Must not be null. |
input | Stream The stream of input data. Must not be null. |
options | UploadParquetOptions 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 a data upload job. |
See UploadParquet for a synchronous example.
UploadParquetAsync(String, String, Stream, UploadParquetOptions, CancellationToken)
public virtual Task<BigQueryJob> UploadParquetAsync(string datasetId, string tableId, Stream input, UploadParquetOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously uploads a stream of Parquet data to the specified table within this client's project. This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to UploadParquetAsync(TableReference, Stream, UploadParquetOptions, CancellationToken).
Parameters | |
---|---|
Name | Description |
datasetId | String The dataset ID. Must not be null. |
tableId | String The table ID. Must not be null. |
input | Stream The stream of input data. Must not be null. |
options | UploadParquetOptions 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 a data upload job. |
See UploadParquet for a synchronous example.
UploadParquetAsync(String, String, String, Stream, UploadParquetOptions, CancellationToken)
public virtual Task<BigQueryJob> UploadParquetAsync(string projectId, string datasetId, string tableId, Stream input, UploadParquetOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously uploads a stream of Parquet data to the specified table. This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to UploadParquetAsync(TableReference, Stream, UploadParquetOptions, CancellationToken).
Parameters | |
---|---|
Name | Description |
projectId | String The project ID. Must not be null. |
datasetId | String The dataset ID. Must not be null. |
tableId | String The table ID. Must not be null. |
input | Stream The stream of input data. Must not be null. |
options | UploadParquetOptions 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 a data upload job. |
See UploadParquet for a synchronous example.
WithDefaultLocation(String)
public virtual BigQueryClient WithDefaultLocation(string defaultLocation)
Creates a new client which uses the specified location by default for all operations where locations can be specified, such as dataset and job creation.
Parameter | |
---|---|
Name | Description |
defaultLocation | String The location to use by default, for job creation etc. |
Returns | |
---|---|
Type | Description |
BigQueryClient | A new client with the specified default location. |
Implementations should normally ensure that the object returned is of the same type as this client, in case users need implementation-specific features of that client.
BigQueryClient client = BigQueryClient.Create(projectId).WithDefaultLocation(Locations.Tokyo);
// This dataset will be implicitly created in the Tokyo region. All jobs will also
// be implicitly created in the Tokyo region.
BigQueryDataset dataset = client.CreateDataset(datasetId);