public sealed class BigQueryDataset
A dataset within BigQuery.
Namespace
Google.Cloud.BigQuery.V2Assembly
Google.Cloud.BigQuery.V2.dll
Remarks
This class wraps the underlying REST API resource and retains a reference to the original client, allowing for simpler dataset-oriented operations.
Constructors
BigQueryDataset(BigQueryClient, Dataset)
public BigQueryDataset(BigQueryClient client, Dataset resource)
Constructs a new dataset.
Parameters | |
---|---|
Name | Description |
client | BigQueryClient The client to use for operations on the dataset. Must not be null. |
resource | Google.Apis.Bigquery.v2.Data.Dataset The REST-ful resource representing the dataset. Must not be null. |
This is public to allow tests to construct instances for production code to consume; production code should not normally construct instances itself.
Properties
FullyQualifiedId
public string FullyQualifiedId { get; }
The fully-qualified identifier for the dataset in a string form of project:dataset
.
Property Value | |
---|---|
Type | Description |
String |
Reference
public DatasetReference Reference { get; }
The fully-qualified identifier for the dataset as a Google.Apis.Bigquery.v2.Data.DatasetReference.
Property Value | |
---|---|
Type | Description |
Google.Apis.Bigquery.v2.Data.DatasetReference |
The properties within the reference can be used to determine the project ID and dataset ID components.
Resource
public Dataset Resource { get; }
The underlying REST-ful resource for the dataset.
Property Value | |
---|---|
Type | Description |
Google.Apis.Bigquery.v2.Data.Dataset |
The data within the resource may be incomplete, depending on how it was obtained.
Methods
CreateRoutine(String, Routine, CreateRoutineOptions)
public BigQueryRoutine CreateRoutine(string routineId, Routine routine, CreateRoutineOptions options = null)
Creates a routine within this dataset. This method just creates a Google.Apis.Bigquery.v2.Data.RoutineReference and delegates to CreateRoutine(RoutineReference, Routine, CreateRoutineOptions).
Parameters | |
---|---|
Name | Description |
routineId | String The routine ID. Must not be null. |
routine | 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. |
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(String, Routine, CreateRoutineOptions, CancellationToken)
public Task<BigQueryRoutine> CreateRoutineAsync(string routineId, Routine routine, CreateRoutineOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously creates a routine within this dataset. This method just creates a Google.Apis.Bigquery.v2.Data.RoutineReference and delegates to CreateRoutineAsync(RoutineReference, Routine, CreateRoutineOptions, CancellationToken).
Parameters | |
---|---|
Name | Description |
routineId | String The routine ID. Must not be null. |
routine | Google.Apis.Bigquery.v2.Data.Routine The routine resource representation to use for the creation. Must not be null. If this table's Google.Apis.Bigquery.v2.Data.Routine.RoutineReference is specified, then it must be the same as 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(String, Table, CreateTableOptions)
public BigQueryTable CreateTable(string tableId, Table table, CreateTableOptions options = null)
Creates a table within this dataset. This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to CreateTable(TableReference, Table, CreateTableOptions).
Parameters | |
---|---|
Name | Description |
tableId | String The table ID. Must not be null. |
table | 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. |
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 BigQueryClient.CreateTable for an example using BigQueryClient.
CreateTable(String, TableSchema, CreateTableOptions)
public BigQueryTable CreateTable(string tableId, TableSchema schema, CreateTableOptions options = null)
Creates a table within this dataset. This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to CreateTable(TableReference, TableSchema, CreateTableOptions).
Parameters | |
---|---|
Name | Description |
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 BigQueryClient.CreateTable for an example using BigQueryClient.
CreateTableAsync(String, Table, CreateTableOptions, CancellationToken)
public Task<BigQueryTable> CreateTableAsync(string tableId, Table table, CreateTableOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously creates a table within this dataset. This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to CreateTableAsync(TableReference, Table, CreateTableOptions, CancellationToken).
Parameters | |
---|---|
Name | Description |
tableId | String The table ID. Must not be null. |
table | 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. |
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 BigQueryClient.CreateTableAsync for an example using BigQueryClient.
CreateTableAsync(String, TableSchema, CreateTableOptions, CancellationToken)
public Task<BigQueryTable> CreateTableAsync(string tableId, TableSchema schema, CreateTableOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously creates a table within this dataset. This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to CreateTableAsync(TableReference, TableSchema, CreateTableOptions, CancellationToken).
Parameters | |
---|---|
Name | Description |
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 BigQueryClient.CreateTableAsync for an example using BigQueryClient.
Delete(DeleteDatasetOptions)
public void Delete(DeleteDatasetOptions options = null)
Deletes this dataset. This method just creates a Google.Apis.Bigquery.v2.Data.DatasetReference and delegates to DeleteDataset(DatasetReference, DeleteDatasetOptions).
Parameter | |
---|---|
Name | Description |
options | DeleteDatasetOptions The options for the operation. May be null, in which case defaults will be supplied. |
See BigQueryClient.Delete for an example using BigQueryClient.
DeleteAsync(DeleteDatasetOptions, CancellationToken)
public Task DeleteAsync(DeleteDatasetOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Deletes this dataset. This method just creates a Google.Apis.Bigquery.v2.Data.DatasetReference and delegates to DeleteDatasetAsync(DatasetReference, DeleteDatasetOptions, CancellationToken).
Parameters | |
---|---|
Name | Description |
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 BigQueryClient.DeleteDatasetAsync for an example using BigQueryClient.
GetModel(String, GetModelOptions)
public BigQueryModel GetModel(string modelId, GetModelOptions options = null)
Retrieves a model within this dataset. This method just creates a Google.Apis.Bigquery.v2.Data.ModelReference and delegates to GetModel(ModelReference, GetModelOptions).
Parameters | |
---|---|
Name | Description |
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(String, GetModelOptions, CancellationToken)
public Task<BigQueryModel> GetModelAsync(string modelId, GetModelOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously retrieves a model within this dataset. This method just creates a Google.Apis.Bigquery.v2.Data.ModelReference and delegates to GetModel(ModelReference, GetModelOptions).
Parameters | |
---|---|
Name | Description |
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 table. |
GetModelReference(String)
public ModelReference GetModelReference(string modelId)
Creates a Google.Apis.Bigquery.v2.Data.ModelReference for a model within this dataset.
Parameter | |
---|---|
Name | Description |
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. |
GetOrCreateRoutine(String, Routine, GetRoutineOptions, CreateRoutineOptions)
public BigQueryRoutine GetOrCreateRoutine(string routineId, Routine routine, GetRoutineOptions getOptions = null, CreateRoutineOptions createOptions = null)
Attempts to fetch the specified routine within this dataset, 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 |
routineId | String The routine ID. Must not be null. |
routine | Google.Apis.Bigquery.v2.Data.Routine The routine resource representation to use for the creation. Must not be null. If this table's Google.Apis.Bigquery.v2.Data.Routine.RoutineReference is specified, then it must be the same as 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(String, Routine, GetRoutineOptions, CreateRoutineOptions, CancellationToken)
public Task<BigQueryRoutine> GetOrCreateRoutineAsync(string routineId, Routine routine, GetRoutineOptions getOptions = null, CreateRoutineOptions createOptions = null, CancellationToken cancellationToken = default(CancellationToken))
Attempts to fetch the specified routine within this dataset, 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 |
routineId | String The routine ID. Must not be null. |
routine | 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. |
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(String, Table, GetTableOptions, CreateTableOptions)
public BigQueryTable GetOrCreateTable(string tableId, Table table, GetTableOptions getOptions = null, CreateTableOptions createOptions = null)
Attempts to fetch the specified table within this dataset, 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 |
tableId | String The table ID. Must not be null. |
table | 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. |
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 BigQueryClient.GetOrCreateTable for an example using BigQueryClient.
GetOrCreateTable(String, TableSchema, GetTableOptions, CreateTableOptions)
public BigQueryTable GetOrCreateTable(string tableId, TableSchema schema, GetTableOptions getOptions = null, CreateTableOptions createOptions = null)
Attempts to fetch the specified table within this dataset, 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 |
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 BigQueryClient.GetOrCreateTable for an example using BigQueryClient.
GetOrCreateTableAsync(String, Table, GetTableOptions, CreateTableOptions, CancellationToken)
public Task<BigQueryTable> GetOrCreateTableAsync(string tableId, Table table, GetTableOptions getOptions = null, CreateTableOptions createOptions = null, CancellationToken cancellationToken = default(CancellationToken))
Attempts to fetch the specified table within this dataset, 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 |
tableId | String The table ID. Must not be null. |
table | 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. |
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 BigQueryClient.GetOrCreateTable for an example using BigQueryClient.
GetOrCreateTableAsync(String, TableSchema, GetTableOptions, CreateTableOptions, CancellationToken)
public Task<BigQueryTable> GetOrCreateTableAsync(string tableId, TableSchema schema, GetTableOptions getOptions = null, CreateTableOptions createOptions = null, CancellationToken cancellationToken = default(CancellationToken))
Attempts to fetch the specified table within this dataset, 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 |
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 BigQueryClient.GetOrCreateTable for an example using BigQueryClient.
GetRoutine(String, GetRoutineOptions)
public BigQueryRoutine GetRoutine(string routineId, GetRoutineOptions options = null)
Retrieves a routine within this dataset. This method just creates a Google.Apis.Bigquery.v2.Data.RoutineReference and delegates to GetRoutine(RoutineReference, GetRoutineOptions).
Parameters | |
---|---|
Name | Description |
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(String, GetRoutineOptions, CancellationToken)
public Task<BigQueryRoutine> GetRoutineAsync(string routineId, GetRoutineOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously retrieves a routine within this dataset. This method just creates a Google.Apis.Bigquery.v2.Data.RoutineReference and delegates to GetRoutineAsync(RoutineReference, GetRoutineOptions, CancellationToken).
Parameters | |
---|---|
Name | Description |
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 table. |
GetRoutineReference(String)
public RoutineReference GetRoutineReference(string routineId)
Creates a Google.Apis.Bigquery.v2.Data.RoutineReference for a routine within this dataset.
Parameter | |
---|---|
Name | Description |
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(String, GetTableOptions)
public BigQueryTable GetTable(string tableId, GetTableOptions options = null)
Retrieves a table within this dataset. This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to GetTable(TableReference, GetTableOptions).
Parameters | |
---|---|
Name | Description |
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 BigQueryClient.GetTable for an example using BigQueryClient.
GetTableAsync(String, GetTableOptions, CancellationToken)
public Task<BigQueryTable> GetTableAsync(string tableId, GetTableOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously retrieves a table within this dataset. This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to GetTableAsync(TableReference, GetTableOptions, CancellationToken).
Parameters | |
---|---|
Name | Description |
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 BigQueryClient.GetTable for an example using BigQueryClient.
GetTableReference(String)
public TableReference GetTableReference(string tableId)
Creates a Google.Apis.Bigquery.v2.Data.TableReference for a table within this dataset.
Parameter | |
---|---|
Name | Description |
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);
BigQueryDataset dataset = client.GetDataset(datasetId);
TableReference reference = dataset.GetTableReference("table");
Console.WriteLine(reference);
ListModels(ListModelsOptions)
public PagedEnumerable<ListModelsResponse, BigQueryModel> ListModels(ListModelsOptions options = null)
Lists the models within this dataset. This method just creates a Google.Apis.Bigquery.v2.Data.DatasetReference and delegates to ListModels(DatasetReference, ListModelsOptions).
Parameter | |
---|---|
Name | Description |
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 this dataset. |
ListModelsAsync(ListModelsOptions)
public PagedAsyncEnumerable<ListModelsResponse, BigQueryModel> ListModelsAsync(ListModelsOptions options = null)
Asynchronously lists the models within this dataset. This method just creates a Google.Apis.Bigquery.v2.Data.DatasetReference and delegates to ListModelsAsync(DatasetReference, ListModelsOptions).
Parameter | |
---|---|
Name | Description |
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 this dataset. |
ListRoutines(ListRoutinesOptions)
public PagedEnumerable<ListRoutinesResponse, BigQueryRoutine> ListRoutines(ListRoutinesOptions options = null)
Lists the routines within this dataset. This method just creates a Google.Apis.Bigquery.v2.Data.DatasetReference and delegates to ListRoutines(DatasetReference, ListRoutinesOptions).
Parameter | |
---|---|
Name | Description |
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 this dataset. |
ListRoutinesAsync(ListRoutinesOptions)
public PagedAsyncEnumerable<ListRoutinesResponse, BigQueryRoutine> ListRoutinesAsync(ListRoutinesOptions options = null)
Asynchronously lists the routines within this dataset. This method just creates a Google.Apis.Bigquery.v2.Data.DatasetReference and delegates to ListRoutinesAsync(DatasetReference, ListRoutinesOptions).
Parameter | |
---|---|
Name | Description |
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 this dataset. |
ListTables(ListTablesOptions)
public PagedEnumerable<TableList, BigQueryTable> ListTables(ListTablesOptions options = null)
Lists the tables within this dataset. This method just creates a Google.Apis.Bigquery.v2.Data.DatasetReference and delegates to ListTables(DatasetReference, ListTablesOptions).
Parameter | |
---|---|
Name | Description |
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 this dataset. |
See BigQueryClient.ListTables for an example using BigQueryClient.
ListTablesAsync(ListTablesOptions)
public PagedAsyncEnumerable<TableList, BigQueryTable> ListTablesAsync(ListTablesOptions options = null)
Asynchronously lists the tables within this dataset. This method just creates a Google.Apis.Bigquery.v2.Data.DatasetReference and delegates to ListTablesAsync(DatasetReference, ListTablesOptions).
Parameter | |
---|---|
Name | Description |
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 this dataset. |
See BigQueryClient.ListTablesAsync for an example using BigQueryClient.
Patch(Dataset, Boolean, PatchDatasetOptions)
public BigQueryDataset Patch(Dataset resource, bool matchETag, PatchDatasetOptions options = null)
Patches this dataset with fields in the specified resource.
Parameters | |
---|---|
Name | Description |
resource | Google.Apis.Bigquery.v2.Data.Dataset The resource to patch with. Must not be null. |
matchETag | Boolean If true, the etag from Resource is propagated into |
options | PatchDatasetOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
BigQueryDataset | The updated dataset. |
This method delegates to PatchDataset(DatasetReference, Dataset, PatchDatasetOptions).
BigQueryClient client = BigQueryClient.Create(projectId);
BigQueryDataset dataset = client.GetDataset(datasetId);
// There's no ETag in this Dataset. The matchETag parameter in the method call
// determines whether the ETag in the original resource is propagated into the
// patch.
Dataset patch = new Dataset
{
FriendlyName = "Patched dataset"
};
BigQueryDataset updated = dataset.Patch(patch, matchETag: true);
Console.WriteLine($"Patched dataset friendly name: {updated.Resource.FriendlyName}");
PatchAsync(Dataset, Boolean, PatchDatasetOptions, CancellationToken)
public Task<BigQueryDataset> PatchAsync(Dataset resource, bool matchETag, PatchDatasetOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously patches this dataset with fields in the specified resource.
Parameters | |
---|---|
Name | Description |
resource | Google.Apis.Bigquery.v2.Data.Dataset The resource to patch with. Must not be null. |
matchETag | Boolean If true, the etag from Resource is propagated into |
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. |
This method delegates to PatchDatasetAsync(DatasetReference, Dataset, PatchDatasetOptions, CancellationToken).
See Patch for a synchronous example.
Update(Dataset, UpdateDatasetOptions)
public BigQueryDataset Update(Dataset resource = null, UpdateDatasetOptions options = null)
Updates this dataset to match the specified resource.
Parameters | |
---|---|
Name | Description |
resource | Google.Apis.Bigquery.v2.Data.Dataset The resource to update with. If null, the Resource property is used. |
options | UpdateDatasetOptions The options for the operation. May be null, in which case defaults will be supplied. |
Returns | |
---|---|
Type | Description |
BigQueryDataset | The updated dataset. |
This method delegates to UpdateDataset(DatasetReference, Dataset, UpdateDatasetOptions). A simple way of updating the dataset is to modify Resource and then call this method with no arguments. This is convenient, but it's important to understand that modifying Resource in this way leaves this object in an unusual state - it represents "the dataset as it was when fetched, but then modified locally". For example, the etag will be the original etag, rather than the one associated with the updated dataset. To avoid this causing confusion, we recommend only taking this approach if the object will not be used afterwards. Use the value returned by this method as the new, self-consistent representation of the dataset.
BigQueryClient client = BigQueryClient.Create(projectId);
BigQueryDataset dataset = client.GetDataset(datasetId);
// This example modifies the in-memory resource in the BigQueryDataset,
// and then applies that change in the server. Alternatively, pass a Dataset
// into the Update method.
dataset.Resource.FriendlyName = "Updated dataset";
BigQueryDataset updated = dataset.Update();
Console.WriteLine($"Updated dataset friendly name: {updated.Resource.FriendlyName}");
UpdateAsync(Dataset, UpdateDatasetOptions, CancellationToken)
public Task<BigQueryDataset> UpdateAsync(Dataset resource = null, UpdateDatasetOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously updates this dataset to match the specified resource.
Parameters | |
---|---|
Name | Description |
resource | Google.Apis.Bigquery.v2.Data.Dataset The resource to update with. If null, the Resource property is used. |
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. |
This method delegates to UpdateDatasetAsync(DatasetReference, Dataset, UpdateDatasetOptions, CancellationToken). A simple way of updating the dataset is to modify Resource and then call this method with no arguments. This is convenient, but it's important to understand that modifying Resource in this way leaves this object in an unusual state - it represents "the dataset as it was when fetched, but then modified locally". For example, the etag will be the original etag, rather than the one associated with the updated dataset. To avoid this causing confusion, we recommend only taking this approach if the object will not be used afterwards. Use the value returned by this method as the new, self-consistent representation of the dataset.
See Update for a synchronous example.
UploadAvro(String, TableSchema, Stream, UploadAvroOptions)
public BigQueryJob UploadAvro(string tableId, TableSchema schema, Stream input, UploadAvroOptions options = null)
Uploads a stream of Avro data to a table. This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to UploadAvro(TableReference, TableSchema, Stream, UploadAvroOptions).
Parameters | |
---|---|
Name | Description |
tableId | String The table ID. Must not be null. |
schema | Google.Apis.Bigquery.v2.Data.TableSchema The schema of the data. May be null if the table already exists, in which case the table schema will be fetched and used. |
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 BigQueryClient.UploadAvro for an example using BigQueryClient.
UploadAvroAsync(String, TableSchema, Stream, UploadAvroOptions, CancellationToken)
public Task<BigQueryJob> UploadAvroAsync(string tableId, TableSchema schema, Stream input, UploadAvroOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously uploads a stream of Avro data to a table. This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to UploadAvroAsync(TableReference, TableSchema, Stream, UploadAvroOptions, CancellationToken).
Parameters | |
---|---|
Name | Description |
tableId | String The table ID. Must not be null. |
schema | Google.Apis.Bigquery.v2.Data.TableSchema The schema of the data. May be null if the table already exists, in which case the table schema will be fetched and used. |
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 BigQueryClient.UploadAvro for an example using BigQueryClient.
UploadCsv(String, TableSchema, Stream, UploadCsvOptions)
public BigQueryJob UploadCsv(string tableId, TableSchema schema, Stream input, UploadCsvOptions options = null)
Uploads a stream of CSV data to a table. This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to UploadCsv(TableReference, TableSchema, Stream, UploadCsvOptions).
Parameters | |
---|---|
Name | Description |
tableId | String The table ID. Must not be null. |
schema | Google.Apis.Bigquery.v2.Data.TableSchema The schema of the data. May be null if the table already exists, in which case the table schema will be fetched and used. |
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. |
See BigQueryClient.UploadCsv for an example using BigQueryClient.
UploadCsvAsync(String, TableSchema, Stream, UploadCsvOptions, CancellationToken)
public Task<BigQueryJob> UploadCsvAsync(string tableId, TableSchema schema, Stream input, UploadCsvOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously uploads a stream of CSV data to a table. This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to UploadCsvAsync(TableReference, TableSchema, Stream, UploadCsvOptions, CancellationToken).
Parameters | |
---|---|
Name | Description |
tableId | String The table ID. Must not be null. |
schema | Google.Apis.Bigquery.v2.Data.TableSchema The schema of the data. May be null if the table already exists, in which case the table schema will be fetched and used. |
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. |
See BigQueryClient.UploadCsvAsync for an example using BigQueryClient.
UploadJson(String, TableSchema, IEnumerable<String>, UploadJsonOptions)
public BigQueryJob UploadJson(string tableId, TableSchema schema, IEnumerable<string> rows, UploadJsonOptions options = null)
Uploads a stream of JSON data to a table. This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to UploadJson(TableReference, TableSchema, IEnumerable<String>, UploadJsonOptions).
Parameters | |
---|---|
Name | Description |
tableId | String The table ID. Must not be null. |
schema | Google.Apis.Bigquery.v2.Data.TableSchema The schema of the data. May be null if the table already exists, in which case the table schema will be fetched and used. |
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.
See BigQueryClient.UploadJson for an example using BigQueryClient.
UploadJson(String, TableSchema, Stream, UploadJsonOptions)
public BigQueryJob UploadJson(string tableId, TableSchema schema, Stream input, UploadJsonOptions options = null)
Uploads a stream of JSON data to a table. This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to UploadJson(TableReference, TableSchema, Stream, UploadJsonOptions).
Parameters | |
---|---|
Name | Description |
tableId | String The table ID. Must not be null. |
schema | Google.Apis.Bigquery.v2.Data.TableSchema The schema of the data. May be null if the table already exists, in which case the table schema will be fetched and used. |
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. |
See BigQueryClient.UploadJson for an example using BigQueryClient.
UploadJsonAsync(String, TableSchema, IEnumerable<String>, UploadJsonOptions, CancellationToken)
public Task<BigQueryJob> UploadJsonAsync(string tableId, TableSchema schema, IEnumerable<string> rows, UploadJsonOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously uploads a stream of JSON data to a 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 |
tableId | String The table ID. Must not be null. |
schema | Google.Apis.Bigquery.v2.Data.TableSchema The schema of the data. May be null if the table already exists, in which case the table schema will be fetched and used. |
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.
See BigQueryClient.UploadJsonAsync for an example using BigQueryClient.
UploadJsonAsync(String, TableSchema, Stream, UploadJsonOptions, CancellationToken)
public Task<BigQueryJob> UploadJsonAsync(string tableId, TableSchema schema, Stream input, UploadJsonOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously uploads a stream of JSON data to a table. This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to UploadJsonAsync(TableReference, TableSchema, Stream, UploadJsonOptions, CancellationToken).
Parameters | |
---|---|
Name | Description |
tableId | String The table ID. Must not be null. |
schema | Google.Apis.Bigquery.v2.Data.TableSchema The schema of the data. May be null if the table already exists, in which case the table schema will be fetched and used. |
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. |
See BigQueryClient.UploadJsonAsync for an example using BigQueryClient.
UploadOrc(String, Stream, UploadOrcOptions)
public BigQueryJob UploadOrc(string tableId, Stream input, UploadOrcOptions options = null)
Uploads a stream of ORC data to a table. This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to UploadOrc(TableReference, Stream, UploadOrcOptions).
Parameters | |
---|---|
Name | Description |
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 BigQueryClient.UploadOrc for an example using BigQueryClient.
UploadOrcAsync(String, Stream, UploadOrcOptions, CancellationToken)
public Task<BigQueryJob> UploadOrcAsync(string tableId, Stream input, UploadOrcOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously uploads a stream of ORC data to a table. This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to UploadOrcAsync(TableReference, Stream, UploadOrcOptions, CancellationToken).
Parameters | |
---|---|
Name | Description |
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 BigQueryClient.UploadOrc for an example using BigQueryClient.
UploadParquet(String, Stream, UploadParquetOptions)
public BigQueryJob UploadParquet(string tableId, Stream input, UploadParquetOptions options = null)
Uploads a stream of Parquet data to a table. This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to UploadParquet(TableReference, Stream, UploadParquetOptions).
Parameters | |
---|---|
Name | Description |
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 BigQueryClient.UploadParquet for an example using BigQueryClient.
UploadParquetAsync(String, Stream, UploadParquetOptions, CancellationToken)
public Task<BigQueryJob> UploadParquetAsync(string tableId, Stream input, UploadParquetOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Asynchronously uploads a stream of Parquet data to a table. This method just creates a Google.Apis.Bigquery.v2.Data.TableReference and delegates to UploadParquetAsync(TableReference, Stream, UploadParquetOptions, CancellationToken).
Parameters | |
---|---|
Name | Description |
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 BigQueryClient.UploadParquet for an example using BigQueryClient.