> 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/app/api/quick-start-guide/tonic-api-generator-assignment/generator-api-reference/generator-api-ref-fnr.md).

# FNR (FnrGenerator)

The [FNR](/app/generation/generators/generator-reference/fnr.md) generator transforms Norwegian national identity numbers.

## Link object structure <a href="#generator-api-fnr-link-object-structure" id="generator-api-fnr-link-object-structure"></a>

The `metadata` object is populated from the [`FnrMetadata`](https://app.tonic.ai/apidocs/index.html#/models/FnrMetadata) object.

`preserveDate` indicates whether to preserve the birthdate values from the source database in the destination database. If the birthdate values are not preserved, the destination values are still within the same range as the source values.

`preserveGender` indicates whether the destination value should reflect the same gender as the source value.

```json
{
  "schema": "string",
  "table": "string",
  "column": "string",
  "path": "string",  //JSON fields only
  "dataType": "string",  //MongoDB, Amazon DynamoDB, and JSON fields only
  "metadata": {
    "presetId": "string",
    "generatorId": "FnrGenerator",
    "preserveDate": boolean,
    "preserveGender": boolean,
    "isConsistent": boolean,
    "consistencyColumn": "string",
    "encryptionProcessor": "x-on", //To use configured Structural data encryption
    "customValueProcessor": "string"  //If custom value processor applied
  }
}
```

## Example replacement <a href="#generator-api-fnr-example-replacement" id="generator-api-fnr-example-replacement"></a>

In the following example replacement for the FNR generator, the birthdate values in the source database are not preserved in the destination database.

The destination values use the same gender as the source values.

The generator is consistent with the `name` column.

```json
{
  "name": "fnr",
  "schema": "public",
  "table": "users",
  "links": [
    {
      "column": "fnr",
      "table": "users",
      "schema": "public",
      "metadata": {
        "presetId": "FnrGenerator",
        "generatorId": "FnrGenerator",
        "preserveDate": false,
        "preserveGender": true,
        "isConsistent": true,
        "consistencyColumn": "name"
      }
    }
  ]
}
```


---

# 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/app/api/quick-start-guide/tonic-api-generator-assignment/generator-api-reference/generator-api-ref-fnr.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.
