# Address

Generates a random mailing address-like string.

You can indicate which part of an address string that the column contains. For example, the column might contain only the street address or the city, or it might contain the full address.

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

<table data-header-hidden><thead><tr><th width="297.09302325581393" 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">Yes, can 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-address"><code>AddressGenerator</code></a></td></tr></tbody></table>

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

To configure the generator:

1. From the **Link To** dropdown list, select the columns to link this column to.\
   \
   You can link columns that use the Address generator to mask one of the following address components:

   * City
   * City State
   * Country
   * Country Code
   * State
   * State Abbreviation
   * Zip Code
   * Latitude
   * Longitude

   \
   Note that when linked to another address column, a country or country code is always the United States.
2. From the address component dropdown list, select the address component that this column contains.\
   \
   The available options are:
   * Building Number
   * Cardinal Direction (North, South, East, West)
   * City
   * City Prefix (Examples: North, South, East, West, Port, New)
   * City Suffix (Examples: land, ville, furt, town)
   * City with State (Example: Spokane, Washington)
   * City with State Abbr (Example: Houston, TX)
   * Country (Examples: Spain, Canada)
   * Country Code (Uses the 2-character country code. Examples: ES, CA)
   * County
   * Direction (Examples: North, Northeast, Southwest, East)
   * Full Address
   * Latitude (Examples: 33.51, 41.32)
   * Longitude (Examples: -84.05, -74.21)
   * Ordinal Direction (Examples: Northeast, Southwest)
   * Secondary Address (Examples: Apt 123, Suite 530)
   * State (Examples: Alabama, Wisconsin)
   * State Abbr (Examples: AL, WI)
   * Street Address (Example: 123 Main Street)
   * Street Name (Examples: Broad, Elm)
   * Street Suffix (Examples: Way, Hill, Drive)
   * US Address
   * US Address with Country
   * Zip Code (Example: 12345)
3. Toggle the **Consistency** setting to indicate whether to make the column consistent.\
   \
   By default, the consistency is disabled.
4. If consistency is enabled, 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 the Address generator is consistent with itself, then the same value in the source database is always mapped to the same destination value. For example, for a column that contains a state name, Alabama is always mapped to Illinois.\
   \
   When the Address generator is consistent with another column, then the same value in the other column always results in the same destination value for the address column. For example, if the address column is consistent with a name column, then every instance of John Smith in the name column in the source database has the same address value in the destination database.
5. 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.

## Spark supported address parts

For the Address generator, Spark workspaces (Databricks and self-managed Spark clusters) only support the following address parts:

* Building Number
* City
* Country
* Country Code
* Full Address
* Latitude
* Longitude
* State
* State Abbr
* Street Address
* Street Name
* Street Suffix
* US Address
* US Address with Country
* Zip Code
