> 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/fabricate/data-masking/masking-complete/masking-data-privacy-review.md).

# Identifying the data and running the privacy review

## Connecting to the source data <a href="#masking-connect-data" id="masking-connect-data"></a>

Before you can start a data masking, you must at least [establish the database connection](https://docs.tonic.ai/fabricate/databases-and-data/data-agent-db-create-manage/database-add-connection.md) to the source database. You can also connect the destination database. The destination connection is required to run the masking workflow.

For more information about the supported database platforms and the associated requirements for data masking, go to [Database requirements for masking](https://docs.tonic.ai/fabricate/data-masking/masking-db-reqs.md).

## Switching to the Masking approach <a href="#masking-approach" id="masking-approach"></a>

To mask data, you switch to the Masking approach. To change to the Masking approach manually, click the mode indicator, then select **Masking**.

<figure><img src="https://4109733485-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmoU4gTR9LxlzHeWmQCUZ%2Fuploads%2FKvMrqKrMZLWQlDXpgeLu%2FDataAgent_ModeDropdown.png?alt=media&amp;token=53b25812-6261-46b8-9e58-3fe8736d0482" alt=""><figcaption><p>Mode and approach dropdown with the Masking option</p></figcaption></figure>

Fabricate also automatically switches to the Masking approach based on your Data Agent prompt.

To start, prompt the Data Agent to mask the source database. If you already connected to the destination database, then you can include that as well. For example:

`Mask the data in the retail_transactions database and write it to the retail_testing database.`

## Running the privacy reviews <a href="#privacy-reviews" id="privacy-reviews"></a>

The Data Agent connects to the source database, then runs a set of privacy reviews to identify the sensitive values.

The first privacy review does an initial pass. The second opinion privacy review checks the results and makes adjustments as needed.

Depending on the number of tables, before it runs the privacy review, the Data Agent prompts you to select the tables to include in the masking.

<figure><img src="https://4109733485-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmoU4gTR9LxlzHeWmQCUZ%2Fuploads%2FURX8v1UGdwnA66qYYaK4%2FDatabase_MaskingTablePrompt.png?alt=media&amp;token=d54edb68-fb52-4094-9f52-69012f0bdf5f" alt=""><figcaption><p>Prompt to select the tables to include in the masking</p></figcaption></figure>

To use all of the tables, click **Use all \<table count> tables**.

To use selected tables:

1. Check the check box for each table to include.
2. Click **Use \<selected count>** tables.

The Data Agent always automatically selects and includes tables that are required because they are connected to a table that you included. You cannot exclude those tables.

For example, an `orders` table contains foreign keys to the `customers` and `regions` tables. If you include the `orders` table, then Fabricate automatically includes the `customers` and `regions` tables.

When the Data Agent automatically adds required tables, the option is **Use \<selected count> tables + \<added count> required**.

## Creating the masking workflow and output preview <a href="#masking-workflow-output-preview" id="masking-workflow-output-preview"></a>

Fabricate then:

* Creates a masking workflow, which includes the masking configuration.
* Adds a preview of the output data to the source database table details.


---

# 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/fabricate/data-masking/masking-complete/masking-data-privacy-review.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.
