Production use of this feature is only available on specific Maia plans. Contact our Sales team for more information.
Use case
This component lets you integrate generative AI output into your transformation pipeline. For example, you can use it to:- Summarize, rewrite, or translate text, such as product descriptions or support tickets.
- Classify text, such as customer feedback, into categories that you describe in the prompt.
- Draft replies to customer messages.
- Extract details from unstructured text into typed columns—for example, a sentiment label and a satisfaction score.
The component calls the model once for each input row, so running it on large tables can incur significant inference costs. Usage is also subject to Google BigQuery’s generative AI quotas. For guidance, read Manage inference costs.
Prerequisites
The Google Cloud service account that calls the Gemini model must have the Agent Platform 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 associated with the environment or, for a Hybrid SaaS 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.
Properties
string
required
A human-readable name for the component.
drop-down
required
Select the Gemini model to use. The following options are currently available:
gemini-3.5-flashgemini-3.1-flash-lite[Custom]: Use a Gemini model that isn’t listed here, which you name in Custom model.
gemini-3.5-flash and gemini-3.1-flash-lite only from multi-regional endpoints. Read the AI.GENERATE documentation to learn which endpoint Google BigQuery uses for the location your query runs in.string
required
The name of the Gemini model to use—for example,
gemini-2.5-pro. Read the AI.GENERATE documentation for the Gemini models that Google BigQuery supports.This property is only available when Model is set to [Custom].text editor
required
The instruction to send to the model for each row—for example,
Summarize this customer review in one sentence.column editor
Select the source columns whose values are sent to the model with the prompt.If you don’t select any inputs, only the prompt is sent.Every row is sent to the model, including rows with no input data. NULL input values are sent as empty text, except in
- 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.
#<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:STRUCT, ARRAY, and JSON columns, where they’re 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.To use grid variables, toggle Use Grid Variable on. For more information, read Grid variables.drop-down
required
- Text: Adds one column containing the model’s response. This is the default setting.
- Structured: Adds one typed column for each field defined in Output schema.
text editor
required
The fields for the model to generate, as a comma-separated list of names and data types—for example,
name STRING, age INT64, phone_number STRING. Each field becomes a column in the output, so field names must be unique. They must also be different from Status column name when Include status is set to Yes, and from the names of the input columns when Include input columns is set to Yes.The supported data types are STRING, INT64, FLOAT64, BOOL, ARRAY, and STRUCT. You can mark a field as NOT NULL so that the model always returns a value for it, and describe a field using OPTIONS(description = '<description>') to tell the model what the field should contain.This property is only available when Output type is set to Structured.boolean
required
- Yes: Outputs both your source input columns and the new columns. This also includes input columns that aren’t selected in Inputs. This is the default setting.
- No: Only outputs the new columns.
string
required
The name of the column that holds the model’s response. The default is
result.When Include status is set to Yes, the name must be different from Status column name. When Include input columns is set to Yes, it must also be different from the names of the input columns.This property is only available when Output type is set to Text.boolean
required
- Yes: Adds a column that reports the outcome of the model call for each row. Read Explanation of output for details.
- No: Doesn’t add a status column. This is the default setting.
string
required
The name of the status column. The default is
status.When Output type is set to Text, the name must be different from Result column name. When Include input columns is set to Yes, it must also be different from the names of the input columns.This property is only available when Include status is set to Yes.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.drop-down
required
- Basic: Set the model’s parameters using Temperature, Top P, and Max output tokens. This is the default setting.
- Advanced: Set the model’s parameters as JSON in Model parameters. Any values set in the Basic properties aren’t used.
floating point number
A value between 0 and 2 (inclusive) that controls the randomness of the model’s output. Lower values make the output more focused and consistent; higher values make it more varied. If you leave this blank, the model’s default is used.This property is only available when Parameter mode is set to Basic.
floating point number
A value between 0 and 1 (inclusive) that controls the randomness of the model’s output by limiting the set of tokens the model chooses from. If you leave this blank, the model’s default is used.This property is only available when Parameter mode is set to Basic.
integer
The maximum number of tokens the model can generate for each response. The value must be 1 or more. If you leave this blank, the model’s default is used.This property is only available when Parameter mode is set to Basic.
JSON
A JSON object of parameters to send to the model. You can set any field in the request body of Google’s To ground responses with Google Search:To lower the model’s thinking level, which reduces latency and cost:This property is only available when Parameter mode is set to Advanced.
generateContent method except contents, which the component fills in from your prompt and inputs. The JSON must be well-formed.To set the temperature, Top P, or maximum output tokens in this mode, include them in generation_config—for example:Explanation of output
The component’s output depends on Output type:- Text: The input columns (if Include input columns is set to Yes), followed by a text column, named by Result column name, that contains the model’s response.
- Structured: The input columns (if Include input columns is set to Yes), followed by one column for each field in Output schema.