# 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: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.tonic.ai/app/api/quick-start-guide/tonic-api-generator-assignment/generator-api-reference/generator-api-ref-fnr.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
