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

# Check Condition

Production use of this feature is only available on specific Maia plans. [Contact our Sales team](https://www.maia.ai/contact-us) for more information.

\<table><tbody><tr><td>Project Availability</td>
            \<td /></tr>
          \<tr><td>Component Type</td>
            \<td>Transformation</td></tr>
          \<tr><td>Connection Inputs</td>
            \<td>One</td></tr>
          \<tr><td>Connection Outputs</td>
            \<td>Unlimited</td></tr></tbody></table>

The **Check Condition** transformation component uses the Google BigQuery [AI.IF](https://docs.cloud.google.com/bigquery/docs/reference/standard-sql/bigqueryml-syntax-ai-if) function and a Google Gemini model to check each row of your input data against a yes/no condition that you write.The component sends your condition and the values of the input columns you select to the model, and adds a column to the output that contains each row's answer as `true` or `false`.The component flags rows but doesn't filter them, so every input row stays in the output. To keep or drop rows based on the answer, add a [Filter](https://docs.maia.ai/docs/components/filter.md) component after it—for example, to keep only the rows where `condition_met` is `true`.### Use caseThis component lets you flag rows of data that meet a condition in your transformation pipeline. For example, you can use it to:* Flag customer reviews or survey comments that meet a condition—for example, reviews that are complaints.
* Flag support tickets or emails that need attention—for example, ones that report a bug or mention a refund.
* Check each row against a condition, then keep only the matching rows for the rest of your pipeline with a Filter component.> [!NOTE]
>
> The component calls the model once for each input row, except rows whose selected inputs are all NULL, so running it on large tables can incur significant inference costs. Usage is also subject to Google BigQuery's [generative AI quotas](https://docs.cloud.google.com/bigquery/quotas#generative_ai_functions). To view these charges, read [Track costs](https://docs.cloud.google.com/bigquery/docs/generative-ai-overview#track_costs).***## PrerequisitesThe Google Cloud service account that calls the Gemini model must have the [Agent Platform User](https://docs.cloud.google.com/iam/docs/roles-permissions/aiplatform#aiplatform.user) role (`roles/aiplatform.user`). Which service account this is depends on the **Agent platform connection** property:- **Agent platform connection left blank:** Google BigQuery calls the model as the Google Cloud service account that your Maia environment uses to access Google BigQuery. This is the service account in the [cloud provider credentials](https://docs.maia.ai/docs/guides/cloud-credentials.md) associated with the environment or, for a [Hybrid SaaS](https://docs.maia.ai/docs/guides/hybrid-saas-bigquery.md) environment with no associated credentials, the Maia runner's own service account.
- **Agent platform connection set:** Google BigQuery calls the model as the service account of the Google BigQuery connection. To create a connection and grant its service account the required role, read [Run generative AI queries with a Google BigQuery Connection](https://docs.cloud.google.com/bigquery/docs/permissions-for-ai-functions#run-connect).***## Properties**Name** `string` *required*A human-readable name for the component.**Model** `drop-down` *required*Select the Gemini model to use. The following options are currently available:- `gemini-3.5-flash`
- `gemini-3.1-flash-lite`
- `[Custom]`: Use a Gemini model that isn't listed here, which you name in **Custom model**.Google serves `gemini-3.5-flash` and `gemini-3.1-flash-lite` only from multi-regional endpoints. Read the [AI.IF](https://docs.cloud.google.com/bigquery/docs/reference/standard-sql/bigqueryml-syntax-ai-if#arguments) documentation to learn which endpoint Google BigQuery uses for the location your query runs in.**Custom model** `string` *required*The name of the Gemini model to use—for example, `gemini-3.7-flash`. Read the [AI.IF](https://docs.cloud.google.com/bigquery/docs/reference/standard-sql/bigqueryml-syntax-ai-if#arguments) documentation for the Gemini models that Google BigQuery supports.This property is only available when **Model** is set to **\[Custom]**.**Condition** `text editor` *required*The yes/no condition that the model checks each row against, written as a question or a statement—for example, `Does this review recommend the product?`**Inputs** `column editor` *required*Select the source columns whose values are sent to the model with the condition. Select at least one column.- **Column Name:** A column from the input table.
- **Descriptive Name (Optional):** An alternate descriptive name to better contextualize the column. Recommended if your column names are low-context.The component adds a colon and a blank line after your condition, then sends each input as a `#<name>` heading followed by its value, with a blank line between inputs. `<name>` is the descriptive name if you've set one, or the column name otherwise. For example:```text theme={null}
Does this review recommend the product?:

#Product
Deluxe Kettle

#Review
Boils quickly and looks great on the counter. I'd happily buy another.
```A NULL input value is sent as empty text, except in `STRUCT`, `ARRAY`, and `JSON` columns, where it's sent as `null`. Input values that aren't text are converted to text before they're sent: `STRUCT`, `ARRAY`, and `JSON` values are converted to JSON text, and other data types are cast to `STRING`. `GEOGRAPHY` columns aren't supported.Toggle **Text mode** on at the bottom of the dialog to open a multi-line editor that lets you add items in a single block. For more information, read [Text mode](https://docs.maia.ai/docs/guides/components-overview.md#text-mode).To use grid variables, toggle **Use Grid Variable** on. For more information, read [Grid variables](https://docs.maia.ai/docs/guides/grid-variables.md).**Agent platform connection** `string`The Google BigQuery connection to use to call the model, in the format `<project_id>.<location>.<connection_id>`—for example, `myproject.us.myconnection`. Leave this blank to call the model as the Google Cloud service account that your environment uses to access Google BigQuery.**Include input columns** `boolean` *required*- **Yes:** Outputs both your source input columns *and* the new result column. This also includes input columns that aren't selected in **Inputs**. This is the default setting.
- **No:** Only outputs the new result column.**Result column name** `string` *required*The name of the column that holds the answer for each row. The default is `condition_met`.When **Include input columns** is set to **Yes**, the name must be different from the names of the input columns, ignoring case.## Explanation of outputThe output contains the input columns (if **Include input columns** is set to **Yes**), followed by the result column, named by **Result column name**. The result column contains a `BOOL` value.If every selected input is NULL for a row, that row's result is NULL.A row whose model call fails doesn't stop the run. Its result is NULL, and the output doesn't show why the call failed, so a failed row looks the same as a row whose selected inputs are all NULL. The run fails only if the model call fails for every row.> [!WARNING]
>
> A filter that keeps only the rows whose result is `true` drops the rows whose result is NULL as well as the rows whose result is `false`.


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