Class DatasetExtensions (2.4.0)

public static class DatasetExtensions

Extension methods for making it easier to work with Dataset

Inheritance

Object > DatasetExtensions

Namespace

Google.Cloud.BigQuery.V2

Assembly

Google.Cloud.BigQuery.V2.dll

Methods

GetDefaultPartitionExpiration(Dataset)

public static TimeSpan? GetDefaultPartitionExpiration(this Dataset dataset)

Gets the default partition expiration period for all partitioned tables created in the dataset. Partitioned tables will (by default) be automatically deleted this long after they are created, unless otherwise specified, such as by ExpirationTime. For partitioned tables, this values has priority over DefaultTableExpirationMs.

Parameter
NameDescription
datasetDataset

The dataset for which to set the expiration for. Must not be null.

Returns
TypeDescription
Nullable<TimeSpan>

GetDefaultTableExpiration(Dataset)

public static TimeSpan? GetDefaultTableExpiration(this Dataset dataset)

Gets the default expiration period for tables created in this dataset. Tables will (by default) be automatically deleted this long after they are created, unless otherwise specified, such as by ExpirationTime.

Parameter
NameDescription
datasetDataset

The dataset for which to set the expiration for. Must not be null.

Returns
TypeDescription
Nullable<TimeSpan>

SetDefaultPartitionExpiration(Dataset, Nullable<TimeSpan>)

public static Dataset SetDefaultPartitionExpiration(this Dataset dataset, TimeSpan? expiration)

Gets the default partition expiration period for all partitioned tables created in the dataset. Partitioned tables will (by default) be automatically deleted this long after they are created, unless otherwise specified, such as by ExpirationTime. For partitioned tables, this values has priority over DefaultTableExpirationMs.

Parameters
NameDescription
datasetDataset

The dataset for which to set the expiration for. Must not be null.

expirationNullable<TimeSpan>

The new expiration to be set.

Returns
TypeDescription
Dataset

The same dataset on which the change was made. To facilitate method chaining.

SetDefaultTableExpiration(Dataset, Nullable<TimeSpan>)

public static Dataset SetDefaultTableExpiration(this Dataset dataset, TimeSpan? expiration)

Sets the default expiration period for tables created in this dataset. Tables will (by default) be automatically deleted this long after they are created, unless otherwise specified, such as by ExpirationTime.

Parameters
NameDescription
datasetDataset

The dataset for which to set the expiration for. Must not be null.

expirationNullable<TimeSpan>

The new expiration to be set.

Returns
TypeDescription
Dataset

The same dataset on which the change was made. To facilitate method chaining.