# SSN

Generates a new valid United States Social Security Number.

You specify the percentage of values for which to include the dashes. For columns that have a numeric data type, Structural automatically excludes the dashes.

## Characteristics <a href="#ssn-characteristics" id="ssn-characteristics"></a>

<table data-header-hidden><thead><tr><th valign="top"></th><th valign="top"></th></tr></thead><tbody><tr><td valign="top"><strong>Consistency</strong></td><td valign="top">Yes, can be made self-consistent or consistent with another column.</td></tr><tr><td valign="top"><strong>Linking</strong></td><td valign="top">No, cannot be linked.</td></tr><tr><td valign="top"><strong>Differential privacy</strong></td><td valign="top">Yes, if consistency is not enabled.</td></tr><tr><td valign="top"><strong>Data-free</strong></td><td valign="top">Yes, if consistency is not enabled.</td></tr><tr><td valign="top"><strong>Allowed for primary keys</strong></td><td valign="top">No</td></tr><tr><td valign="top"><strong>Allowed for unique columns</strong></td><td valign="top">No</td></tr><tr><td valign="top"><strong>Uses format-preserving encryption (FPE)</strong></td><td valign="top">No</td></tr><tr><td valign="top"><strong>Privacy ranking</strong></td><td valign="top"><ul><li>1 if not consistent</li><li>4 if consistent</li></ul></td></tr><tr><td valign="top"><strong>Generator ID (for the API)</strong></td><td valign="top"><a href="../../../api/quick-start-guide/tonic-api-generator-assignment/generator-api-reference/generator-api-ref-ssn"><code>SsnGenerator</code></a></td></tr></tbody></table>

## How to configure <a href="#ssn-configure" id="ssn-configure"></a>

To configure the generator:

1. In the **Percent with -'s** field, type the percentage of output values for which to include dashes in the format.\
   \
   For example, if you set this to `60`, then 60% of the output values are formatted `123-45-6789`, and 40% are formatted `123456789`.\
   \
   If you set this to `100`, then all of the output values are formatted `123-45-6789`.\
   \
   If you set this to `0`, then all of the output values are formatted `12345679`.\
   \
   For columns that have a numeric data type, Structural automatically generates the output values without dashes.
2. Toggle the **Consistency** setting to indicate whether to make the generator consistent.\
   \
   By default, consistency is disabled.
3. If you enable consistency, then by default the generator is self-consistent.\
   \
   To make the generator consistent with another column, from the **Consistent to** dropdown list, select the column.\
   \
   When a generator is self-consistent, then a given value in the source database is always mapped to the same value in the destination database.\
   \
   When a generator is consistent with another column, then a given value for that other column in the source database results in the same SSN in the destination database. For example, if the SSN column is consistent with a Name column, then every instance of John Smith in the source database results in the same SSN in the destination database.
4. If [Structural data encryption](https://docs.tonic.ai/app/generation/generators-assign-config/generators-data-encryption-config) is enabled, then to use it for this column, in the advanced options section, toggle **Use data encryption process** to the on position.
