> ## Documentation index
> Fetch the complete documentation index at: https://docs.prescientai.com/llms.txt
> Use this file to discover all available pages before exploring further. Add `.md` to any page URL to get that page as Markdown.

# Data patches

> What a data patch is, when to use one in place of a new connection, which channels can take a patch, and which columns a patch sheet needs.

A data patch is a Google Sheet of extra rows that Prescient lays over the data of a connected channel. The connection stays as it is. The patch adds rows that the connection cannot give, or corrects rows that are wrong at the source.

| Term       | What the product says                                               |
| ---------- | ------------------------------------------------------------------- |
| Data patch | Overlay a Google Sheet of supplemental rows on this channel's data. |

## When do you use a data patch?

Use a patch when the platform connection is correct for most dates and wrong or empty for some. A common case is a gap in historical ad spend.

Do not use a patch as the only source of a channel. A patch needs a live connection below it. If you supply the whole data of a channel yourself, connect the channel through Google Sheets, a warehouse, or a file location.

## Which channels can take a patch?

| Subject                          | Rule                                                                                                                                     |
| -------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
| Source of a patch                | A data patch is always a named range of a Google Sheet.                                                                                  |
| Channels that can take a patch   | The channel has a live connection, and you do not supply the data of the channel through Google Sheets, a warehouse, or a file location. |
| Categories that can take a patch | Advertising, analytics, e-commerce, and retail channels can take a patch. Conversion channels and other channels cannot.                 |

A channel that you already supply from a sheet, a warehouse, or a file location cannot take a patch. Correct that source directly.

## Which columns does a patch sheet need?

| Subject                       | Requirement                                                                                                                                           |
| ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
| Columns of a patch sheet      | A patch sheet uses the columns of the category of the channel. The key columns are required. The main metric columns are optional in a patch.         |
| Column names of a patch sheet | A patch sheet always uses the Google Sheets column names of the category, for each connection method of the channel. The date column is created_date. |
| Sharing instructions          | The left side of the data patch dialog shows the instructions to share a Google Sheet with Prescient.                                                 |
| Change of a patch             | A change of the sheet or the named range drops the last test result. Test the patch again.                                                            |

The key columns are the date and the columns that make a row unique, for example the campaign of an advertising row. For the full list of columns for each type, see [Data requirements](https://docs.prescientai.com/reference/data-center/data-requirements).

## How do you know that a patch works?

Data Center tests the sheet when you save the patch, and the row of the channel shows the badge **Patch**. If a later test fails, the badge changes to **Patch failing**. See [How do you read the state of a patch](https://docs.prescientai.com/data-center/add-a-data-patch#how-do-you-read-the-state-of-a-patch).
