> ## 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

### filter

<ul>
  <li>
    filter(\
    &#x20;table\_name: string,\
    &#x20;view\_name: string | undefined,\
    &#x20;expression: string,\
    &#x20;options?: Record\<string, string>,\
    &#x20;callback?: [GPUdbCallback](https://docs.kinetica.com/content/api/javascript/types/GPUdbCallback.md),\
    ): Promise\<[FilterResponse](https://docs.kinetica.com/content/api/javascript/interfaces/FilterResponse.md)>

    Filters 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.

    #### Parameters

    <ul>
      <li>
        table\_name: string

        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: string | undefined

        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: string

        The select expression to filter the specified table. For details see Expressions.
      </li>

      <li>
        `Optional`options: Record\<string, string>

        Optional parameters.
      </li>

      <li>
        `Optional`callback: [GPUdbCallback](https://docs.kinetica.com/content/api/javascript/types/GPUdbCallback.md)

        Optional callback function
      </li>
    </ul>

    #### Returns Promise\<[FilterResponse](https://docs.kinetica.com/content/api/javascript/interfaces/FilterResponse.md)>

    Promise\<Types.FilterResponse> - Promise resolving to the response

    <ul>
      <li>Defined in [src/GPUdb.ts:9138](https://github.com/kineticadb/kinetica-api-typescript/blob/master/src/GPUdb.ts#L9138)</li>
    </ul>
  </li>
</ul>

### filter\_request

<ul>
  <li>
    filter\_request(\
    &#x20;request: [FilterRequest](https://docs.kinetica.com/content/api/javascript/interfaces/FilterRequest.md),\
    &#x20;callback?: [GPUdbCallback](https://docs.kinetica.com/content/api/javascript/types/GPUdbCallback.md),\
    ): Promise\<[FilterResponse](https://docs.kinetica.com/content/api/javascript/interfaces/FilterResponse.md)>

    Filters 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.

    #### Parameters

    <ul>
      <li>
        request: [FilterRequest](https://docs.kinetica.com/content/api/javascript/interfaces/FilterRequest.md)

        Request object containing the parameters for the operation
      </li>

      <li>
        `Optional`callback: [GPUdbCallback](https://docs.kinetica.com/content/api/javascript/types/GPUdbCallback.md)

        Optional callback function
      </li>
    </ul>

    #### Returns Promise\<[FilterResponse](https://docs.kinetica.com/content/api/javascript/interfaces/FilterResponse.md)>

    Promise\<Types.FilterResponse> - Promise resolving to the response

    <ul>
      <li>Defined in [src/GPUdb.ts:9104](https://github.com/kineticadb/kinetica-api-typescript/blob/master/src/GPUdb.ts#L9104)</li>
    </ul>
  </li>
</ul>


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