# Google BigQuery v2 API - Class Filters (3.12.0)

3.12.0 (latest) 3.11.0 3.10.0 3.9.0 3.8.0 3.7.0 3.6.0 3.5.0 3.4.0 3.3.0 3.2.0 3.1.0 3.0.0 2.4.0 2.3.0 2.2.0

    public static class Filters

Reference documentation and code samples for the Google BigQuery v2 API class Filters.

Helper method to build filter strings.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> Filters

## Inherited Members

[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Google.Cloud.BigQuery.V2](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BigQuery.V2/latest/Google.Cloud.BigQuery.V2)

## Assembly

Google.Cloud.BigQuery.V2.dll

## Methods

### FromLabel(string, string)

    public static string FromLabel(string name, string value)

Creates a filter for a single label.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` The name of the label to filter on. Must not be null or empty. |
| `value` | `https://learn.microsoft.com/dotnet/api/system.string` The value for the label. May be null or empty. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` | A string of the form "labels.{name}:{value}" when `value` is non-null and non-empty, or "labels.{name}" when `value` is null. |

### FromLabels(IDictionary\<string, string\>)

    public static string FromLabels(IDictionary<string, string> labels)

Creates a filter for the given labels.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `labels` | `https://learn.microsoft.com/dotnet/api/system.collections.generic.idictionary-2https://learn.microsoft.com/dotnet/api/system.stringhttps://learn.microsoft.com/dotnet/api/system.string` The labels to filter by. Must not be null. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` | A filter for the given labels. |

**Remarks** See [FromLabel(string, string)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BigQuery.V2/latest/Google.Cloud.BigQuery.V2.Filters#Google_Cloud_BigQuery_V2_Filters_FromLabel_System_String_System_String_) for the format of a single label; this method joins
multiple labels together with spaces.