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

# Insert Rows

> Inserts data rows into Google BigQuery tables with schema validation

Inserts data rows into Google BigQuery tables with schema validation

|                       |                        |
| --------------------- | ---------------------- |
| **App**               | BigQuery               |
| **Operation ID**      | `bigquery_insert_rows` |
| **Type**              | Action                 |
| **Connection**        | `bigquery` (required)  |
| **Credits per run**   | 1                      |
| **Agent / MCP tool**  | Yes                    |
| **Requires approval** | Yes (write operation)  |

## Inputs

| Field               | Type                                                    | Required | Default | Description                                                                                                                                                                               |
| ------------------- | ------------------------------------------------------- | -------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `project`           | string or SelectItem                                    | Yes      | -       | Select the Google BigQuery project, ask the user for it if not provided                                                                                                                   |
| `dataset`           | string or SelectItem                                    | Yes      | -       | Select the BigQuery dataset containing your target table                                                                                                                                  |
| `table`             | string or SelectItem                                    | Yes      | -       | Select the target BigQuery table to insert rows into                                                                                                                                      |
| `write_type`        | string or SelectableOption                              | Yes      | -       | Choose how to map your data into the BigQuery table. Available options: 'all' (Use All Data), 'mapped' (Map Specific Columns)                                                             |
| `data`              | array of object (also accepts a comma-separated string) | No       | -       | Select the data to insert into the BigQuery table. This will be mainly the output of upstream nodes in the workflow. Don't worry about data conversion, it will be handled automatically. |
| `column_mapping`    | ColumnMapping                                           | No       | -       | Map your data to BigQuery table columns when using 'mapped' write type                                                                                                                    |
| `allow_new_columns` | boolean                                                 | No       | `True`  | Automatically add new columns to the table schema if they don't exist                                                                                                                     |

### ColumnMapping

Column mapping configuration where key, value pairs.

| Field  | Type   | Required | Default | Description |
| ------ | ------ | -------- | ------- | ----------- |
| `root` | object | Yes      | -       |             |

### SelectItem

| Field   | Type   | Required | Default | Description                                                                                          |
| ------- | ------ | -------- | ------- | ---------------------------------------------------------------------------------------------------- |
| `value` | string | Yes      | -       | The value of the selectable item.                                                                    |
| `label` | string | Yes      | -       | The label of the selectable item, used for display purposes. If not provided, defaults to the value. |

### SelectableOption

| Field   | Type   | Required | Default | Description |
| ------- | ------ | -------- | ------- | ----------- |
| `value` | string | Yes      | -       |             |
| `label` | string | Yes      | -       |             |

## Output

**Type**: `Dict`

Returns insert confirmation.

**Fields**: `success`, `rows_inserted`, `invalid_rows`, `new_columns_added`
