> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kinetica.com/llms.txt
> Use this file to discover all available pages before exploring further.

# filter

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/generated/filter.rs#L35-L48)
pub async fn [filter](https://docs.kinetica.com/content/api/rust/gpudb/struct.Kinetica/filter.md#method.filter)( \&self, table\_name: [String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html), view\_name: [String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html), expression: [String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html), ) -> [Result](https://doc.rust-lang.org/1.98.1/core/result/enum.Result.html)\<[FilterResponse](https://docs.kinetica.com/content/api/rust/generated/api/struct.FilterResponse.md), [KineticaError](https://docs.kinetica.com/content/api/rust/errors/enum.KineticaError.md)>

Filter a dataset for records matching an expressionFilters data based on the specified expression. The results are stored in a result set with the given `view_name`.For details see Expressions.The response message contains the number of points for which the expression evaluated to be true, which is equivalent to the size of the result view.

##### Arguments

<ul>
  <li>`table_name` - Name of the table to filter, in \[schema\_name.]table\_name format, using standard name resolution rules. This may be the name of a table or a view (when chaining queries).</li>
  <li>`view_name` - If provided, then this will be the name of the view containing the results, in \[schema\_name.]view\_name format, using standard name resolution rules and meeting table naming criteria. Must not be an already existing table or view.</li>
  <li>`expression` - The select expression to filter the specified table. For details see Expressions.</li>
</ul>

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/generated/filter.rs#L75-L95)
pub async fn [filter\_with\_opts](https://docs.kinetica.com/content/api/rust/gpudb/struct.Kinetica/filter.md#method.filter_with_opts)( \&self, table\_name: [String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html), view\_name: [String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html), expression: [String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html), options: [FilterRequestOptions](https://docs.kinetica.com/content/api/rust/generated/api/struct.FilterRequestOptions.md), ) -> [Result](https://doc.rust-lang.org/1.98.1/core/result/enum.Result.html)\<[FilterResponse](https://docs.kinetica.com/content/api/rust/generated/api/struct.FilterResponse.md), [KineticaError](https://docs.kinetica.com/content/api/rust/errors/enum.KineticaError.md)>

Filter a dataset for records matching an expressionFilters data based on the specified expression. The results are stored in a result set with the given `view_name`.For details see Expressions.The response message contains the number of points for which the expression evaluated to be true, which is equivalent to the size of the result view.

##### Arguments

<ul>
  <li>`table_name` - Name of the table to filter, in \[schema\_name.]table\_name format, using standard name resolution rules. This may be the name of a table or a view (when chaining queries).</li>
  <li>`view_name` - If provided, then this will be the name of the view containing the results, in \[schema\_name.]view\_name format, using standard name resolution rules and meeting table naming criteria. Must not be an already existing table or view.</li>
  <li>`expression` - The select expression to filter the specified table. For details see Expressions.</li>
  <li>`options` - The optional parameters; any left unset take the server’s defaults.</li>
</ul>

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/generated/filter.rs#L98-L109)
pub async fn [filter\_raw](https://docs.kinetica.com/content/api/rust/gpudb/struct.Kinetica/filter.md#method.filter_raw)( \&self, request: &[FilterRequest](https://docs.kinetica.com/content/api/rust/generated/api/struct.FilterRequest.md), ) -> [Result](https://doc.rust-lang.org/1.98.1/core/result/enum.Result.html)\<[FilterResponse](https://docs.kinetica.com/content/api/rust/generated/api/struct.FilterResponse.md), [KineticaError](https://docs.kinetica.com/content/api/rust/errors/enum.KineticaError.md)>

Sends a pre-built [`FilterRequest`](https://docs.kinetica.com/content/api/rust/generated/api/struct.FilterRequest) to the `/filter` endpoint.

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/generated/filter.rs#L113-L125)
pub async fn [filter\_from\_url](https://docs.kinetica.com/content/api/rust/gpudb/struct.Kinetica/filter.md#method.filter_from_url)( \&self, url: &[str](https://doc.rust-lang.org/1.98.1/std/primitive.str.html), request: &[FilterRequest](https://docs.kinetica.com/content/api/rust/generated/api/struct.FilterRequest.md), ) -> [Result](https://doc.rust-lang.org/1.98.1/core/result/enum.Result.html)\<[FilterResponse](https://docs.kinetica.com/content/api/rust/generated/api/struct.FilterResponse.md), [KineticaError](https://docs.kinetica.com/content/api/rust/errors/enum.KineticaError.md)>

Sends a pre-built [`FilterRequest`](https://docs.kinetica.com/content/api/rust/generated/api/struct.FilterRequest) to a specific worker URL, bypassing HA head-node selection. Used for multi-head access.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.