# Reviewing and applying recommended generators

{% hint style="info" %}
**Required workspace permission:** Configure column generators
{% endhint %}

The Tonic Structural sensitivity scan identifies specific types of sensitive data. For each sensitivity type that it detects, Structural can have a recommended generator. For example, for a value that the sensitivity scan identifies as a Social Security Number, Structural recommends the SSN generator. For a first name, Structural recommends the Name generator configured with First as the value type.

The [Structural Agent](https://docs.tonic.ai/app/structural-agent/agent-about) automatically summarizes and prompts you to apply the recommended generators. You can also ask the Agent to apply recommended generators at any time. For example:

* `Apply all of the recommended generators.`
* `Apply recommended generators to columns that contain names.`

You can also review and apply recommended generators from **Privacy Hub** and **Database View**.

## Applying the recommended generator to a single column <a href="#rec-generator-single-column" id="rec-generator-single-column"></a>

### Privacy Hub <a href="#rec-gen-apply-privacy-hub-single-column" id="rec-gen-apply-privacy-hub-single-column"></a>

In **Privacy Hub**, on the settings view of the column details panel, for a detected sensitive column that does not have an applied generator, and that has a recommended generator, Structural displays a button for the recommended generator.

<figure><img src="https://3378426797-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LSQCLFQ4bslJ-HYc8c3%2Fuploads%2FAiOyXnmlEq3MsdpceCsg%2FPrivacyHubColumnDetails.png?alt=media&#x26;token=11e894a1-f549-47b2-993f-c3f225236a27" alt=""><figcaption><p>Column details with recommended generator button</p></figcaption></figure>

To apply the recommended generator, click the button.

### Database View <a href="#rec-generator-single-column-database-view" id="rec-generator-single-column-database-view"></a>

On **Database View**, when a column has a recommended generator, the generator dropdown displays the available recommendation icon.

<figure><img src="https://3378426797-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LSQCLFQ4bslJ-HYc8c3%2Fuploads%2FAPVMvI78WvrLnOA9fFgR%2FDatabaseViewColumnRecommendedGeneratorIcon.png?alt=media&#x26;token=5ed0c5a8-5d5c-4ac7-9759-e45b71bc6348" alt=""><figcaption><p>Recommended generator icon in Database View</p></figcaption></figure>

To apply the recommended generator:

1. Click the generator dropdown.
2. On the column configuration panel, click **Apply**.

<figure><img src="https://3378426797-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LSQCLFQ4bslJ-HYc8c3%2Fuploads%2Fg8THWhlDW8aDZlchEx3o%2FDatabaseViewColumnRecommendedGenerator.png?alt=media&#x26;token=b9295d50-abff-48c5-9511-2e1d81c5a47b" alt=""><figcaption><p>Recommended generator panel for a Database View column</p></figcaption></figure>

### Table View

On **Table View**, when a column has a recommended generator, the available recommendation icon displays in the column heading next to the dropdown icon.

To apply the recommended generator:

<figure><img src="https://3378426797-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LSQCLFQ4bslJ-HYc8c3%2Fuploads%2Fk2yN7qj0gVLFcdmFzpg5%2FTableViewRecommendedGeneratorPanel.png?alt=media&#x26;token=64b2aa41-4db6-4673-ad83-05b9a0d6047c" alt=""><figcaption><p>Recommended generator panel for a Table View column</p></figcaption></figure>

1. Click the generator dropdown.
2. On the column configuration panel, click **Apply**.

## Privacy Hub - reviewing and applying recommended generators by sensitivity type <a href="#rec-gen-apply-privacy-hub-by-sensitivity-type" id="rec-gen-apply-privacy-hub-by-sensitivity-type"></a>

When there are detected sensitive columns that are not protected, **Privacy Hub** displays a **Sensitivity Recommendations** banner. The banner displays the number of detected, unprotected columns.

<figure><img src="https://3378426797-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LSQCLFQ4bslJ-HYc8c3%2Fuploads%2FPUI4isqD6XL5bK0IUS67%2FPrivacyHubSensitivityRecommendations.png?alt=media&#x26;token=81cdaf2c-5d6b-4442-bf2c-c20424e22772" alt=""><figcaption><p>Sensitivity Recommendations banner on Privacy Hub</p></figcaption></figure>

To review the recommended generators, and determine whether to apply them, click **Review Recommendations**.

The **Recommended Generators by Sensitivity Type** panel displays the list of sensitivity types for which there are detected, unprotected columns.

<figure><img src="https://3378426797-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LSQCLFQ4bslJ-HYc8c3%2Fuploads%2Fh2rkdemkZ8XZEBX0dZFF%2FRecommendedGeneratorsBySensitivityType.png?alt=media&#x26;token=71aaba4d-aae6-4c79-8924-d95cdbfab7e1" alt=""><figcaption><p>Recommended Generators by Sensitivity Type panel</p></figcaption></figure>

### Displaying the list of columns for a sensitivity type <a href="#rec-gen-sensitivity-type-display-list" id="rec-gen-sensitivity-type-display-list"></a>

To display the columns for a sensitivity type, click the expand icon for that type.

To hide the column list, click the collapse icon.

<figure><img src="https://3378426797-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LSQCLFQ4bslJ-HYc8c3%2Fuploads%2FiH1ZDjnfwoo6Nf3Zghps%2FReviewRecommendationsExpandedSensitivityType.png?alt=media&#x26;token=b6b0f538-1c10-48f4-a3a3-649c26d7686e" alt=""><figcaption><p>Expanded column list for a sensitivity type</p></figcaption></figure>

For each column, the list includes the following information:

* The table and schema name
* The column name, with the column data type.\
  \
  For [JSON columns that use **Document View**](https://docs.tonic.ai/app/generation/working-with-document-based-data/json-document-view), the panel lists each JSON field separately. The **Column Name** column contains both the column name and the JSON path.
* An example value from the source data (**Original Data**), with a corresponding destination value when the recommended generator is applied (**Expected Output**).

To display a larger sample of source and destination values, in the **Expected Output** column, click the view icon.

### Viewing linkable columns for addresses <a href="#rec-gen-linkable-columns" id="rec-gen-linkable-columns"></a>

Address columns that can be linked are displayed in groups.

For example, if a table includes columns for both city and state values, then those columns are displayed as a group. When you apply the recommended generators to the group, the columns are also linked.

<figure><img src="https://3378426797-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LSQCLFQ4bslJ-HYc8c3%2Fuploads%2Fwvk96jBKKfldtdNp93pw%2FRecommendedGeneratorsAddressGroup.png?alt=media&#x26;token=06ec817f-40f8-4d1e-8630-0d1dc7d36d70" alt=""><figcaption><p>Group of linkable address columns</p></figcaption></figure>

There are separate Address entries for individual columns and for groups of columns to link.

<figure><img src="https://3378426797-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LSQCLFQ4bslJ-HYc8c3%2Fuploads%2FmOl4eAe8heWcL9Fjtd5B%2FRecommendedGeneratorsAddressEntries.png?alt=media&#x26;token=bd949052-f65a-40d9-a319-719f5b81cbbd" alt=""><figcaption><p>Entries for individual address columns and groups of linkable address columns</p></figcaption></figure>

### Filtering the column lists

To filter the lists, you can use either:

* Schema name
* Table name
* Column name

Start to type text that is in the schema, table, or column name. As you type, Structural applies the filter to all of the lists.

### Selecting and deselecting columns <a href="#rec-gen-sensitivity-type-select-columns" id="rec-gen-sensitivity-type-select-columns"></a>

When you first display the panel, all of the columns are selected. The selected columns are affected when you apply recommended generators or ignore columns.

Within each sensitivity type, you can select or deselect individual columns.

You can use the checkbox in the column heading to select or deselect all of the columns for a sensitivity type.

### Enabling and disabling consistency for columns <a href="#rec-gen-consistency" id="rec-gen-consistency"></a>

Before you apply a recommended generator, you can enable or disable consistency for each individual column, or for all of the columns for a sensitivity type.

You can only enable self-consistency. You cannot configure consistency with other columns.

The recommended generators panel contains a **Consistency** toggle for each column. The toggle in the column heading enables or disables consistency for all of the columns for a sensitivity type. If the recommended generator does not support consistency, then the toggle is disabled.

<figure><img src="https://3378426797-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LSQCLFQ4bslJ-HYc8c3%2Fuploads%2F5Pt6UeZwi9kJeSXYqAiQ%2FRecommendedGeneratorsConsistencyColumn.png?alt=media&#x26;token=ff7e7ccf-3f8d-4551-b997-07b0d2679839" alt=""><figcaption><p>Consistency column to enable self-consistency for a column</p></figcaption></figure>

To enable self-consistency, toggle **Consistency** to the on position. To disable self-consistency, toggle **Consistency** to the off position.

### Applying the recommended generator for a sensitivity type <a href="#rec-gen-sensitivity-type-apply-generator" id="rec-gen-sensitivity-type-apply-generator"></a>

To apply the recommended generator to the selected columns for a sensitivity type, click the **Apply** option for that sensitivity type.

When you apply the recommended generator, Structural removes the column from the list.

### Removing the generator recommendation for a sensitivity type <a href="#rec-gen-sensitivity-type-remove-rec" id="rec-gen-sensitivity-type-remove-rec"></a>

If the recommended generator is incorrect, then you can ignore the recommendation.

To ignore the recommended generator for the selected columns in a sensitivity type:

<figure><img src="https://3378426797-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LSQCLFQ4bslJ-HYc8c3%2Fuploads%2FiOgO1jxUUkmrJcPoeKG0%2FReviewRecommendationsIgnoreMenu.png?alt=media&#x26;token=133e4c9f-1e7e-4c8e-b11d-fd6067f97d73" alt=""><figcaption><p>Ignore menu for a sensitivity type</p></figcaption></figure>

1. Click the **Ignore** option for the sensitivity type.
2. In the **Ignore** dropdown list, click **Ignore generator recommendation**.

When you ignore the generator recommendation:

* The column is removed from the list.
* The recommended generator is removed. This includes the recommendation on the **Privacy Hub** column configuration panel.
* The column continues to be marked as sensitive.

### Marking a column as not sensitive <a href="#rec-gen-sensitivity-type-mark-not-sensitive" id="rec-gen-sensitivity-type-mark-not-sensitive"></a>

{% hint style="info" %}
**Required workspace permission:** Configure column sensitivity
{% endhint %}

You can mark selected columns for a sensitivity type as not sensitive. For example, a correctly identified first name value might be a test value that is not actually sensitive and does not need to be transformed.

To mark selected columns in a sensitivity type as not sensitive:

1. Click the **Ignore** option for the sensitivity type.
2. In the Ignore dropdown list, click **Mark as not sensitive**.

When you mark a column as not sensitive, it is removed from the list.

### Applying the recommended generator to all of the selected columns <a href="#rec-gen-sensitivity-type-apply-all" id="rec-gen-sensitivity-type-apply-all"></a>

To apply the recommended generators to all of the selected columns across all of the sensitivity types, click **Apply All**.

## Database View - Applying recommended generators to multiple columns <a href="#recommended-generators-db-view-bulk" id="recommended-generators-db-view-bulk"></a>

On **Database View**, the **Bulk Edit** panel includes an option to apply the recommended generators to the selected columns that have an available recommendation.

<figure><img src="https://3378426797-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LSQCLFQ4bslJ-HYc8c3%2Fuploads%2FF22Ievusab1sCSiXUtMm%2FDatabaseViewBulkRecommendations.png?alt=media&#x26;token=c2b58d7d-b834-4e4d-9827-616d3bd9eff8" alt=""><figcaption><p>Database View Bulk Edit panel with option to apply recommended generators</p></figcaption></figure>

From **Database View**, to apply recommended generators to multiple columns:

1. Check the checkbox for each column to update.
2. Click **Bulk Edit**.
3. On the bulk editing panel, in the **Generator recommendations found** panel, click **Apply**.
