> For the complete documentation index, see [llms.txt](https://docs.tonic.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tonic.ai/app/generation/subsetting/table-filtering.md).

# Using table filtering for data warehouses and Spark-based data connectors

Some Tonic Structural data connectors do not support subsetting.

However, for the following connectors that do not support subsetting, to generate a smaller set of data, you instead can add table filters.

* [Apache Iceberg](/app/setting-up-your-database/apache-iceberg.md). Note that table filters for Apache Iceberg use DuckDB syntax.
* [Databricks](/app/setting-up-your-database/databricks.md)
* [Google BigQuery](/app/setting-up-your-database/google-bigquery.md)

The [Snowflake](/app/setting-up-your-database/snowflake.md) and [Amazon Redshift](/app/setting-up-your-database/amazon-redshift.md) data connectors support both subsetting and table filtering:

You can only filter tables that use De-identify table mode. The filter identifies the rows from the source database to process and include in the destination database.

Note that unlike subsetting, table filters do not guarantee referential integrity.

To add a filter, in the **Table Filter** text area on the table mode panel, provide the `WHERE` clause for the filter, then click **Apply**.

<figure><img src="https://3378426797-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LSQCLFQ4bslJ-HYc8c3%2Fuploads%2FnMWoSqhQDxZux5mhXoV3%2FTableModeConfigBigQuery.png?alt=media&amp;token=96960b12-fb16-40c9-a886-1a621f50903d" alt=""><figcaption><p>Table mode configuration panel for a <br>Google BigQuery workspace</p></figcaption></figure>

For Databricks workspaces where the source database uses Delta files, the filter `WHERE` clause can only refer to columns that have partitions.

For Google BigQuery, the filter `WHERE` clause can refer to columns without partitions. However, the performance is better when the referenced columns have partitions.

On the workspace configuration for Databricks, the **Enable partition filter validation** toggle determines whether Structural validates the `WHERE` clause when you create it. By default, the toggle is in the on position, and the `WHERE` clause is validated.

For Amazon Redshift, Google BigQuery, and Snowflake, Structural always validates the `WHERE` clause.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.tonic.ai/app/generation/subsetting/table-filtering.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
