> For the complete documentation index, see [llms.txt](https://docs.datafakery.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.datafakery.io/fundamentals/generators-fakers/foreign-keys-generator.md).

# Foreign Keys Generator

## Faker Configuration

* **Source**: Define the source of the foreign key values. In this example:
  * **Source Type**: Select the type of source (e.g., SQL Table).
  * **Table Name**: Choose the table from which to fetch the foreign key values (e.g., Person).
  * **Value Lookup (Mapping)**: Select the column used for value lookup and mapping (e.g., FirstName).
* **Add Suffix**: Enter any additional suffix to append to the generated data (optional).
* **Replace only if Non-Null**: Check this box to ensure that the faker only replaces non-null values in the column. If unchecked, it will replace all values, including nulls.

<figure><img src="/files/TJWYv0jcnTVTxylP9Gac" alt=""><figcaption></figcaption></figure>
