# Noise Generator (NoiseGenerator)

The [Noise Generator](https://docs.tonic.ai/app/generation/generators/generator-reference/noise-generator) masks values in numeric columns. It adds or multiplies the original value by random noise.

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

The Noise Generator does not support linking. It can be either self-consistent or consistent with another column. You cannot configure differential privacy.

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

* Whether to use additive or multiplicative noise.
* For additive noise, the percentage of the underlying value to scale the noise to.
* For multiplicative noise, the minimum and maximum value for the scaling factor.

{% code overflow="wrap" %}

```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": "NoiseGenerator",
    "noiseStrategy": "enum",
    "min": numeric,  //For multiplicative
    "max": numeric,  //For multiplicative
    "ratio": numeric  //For additive
    "decimalPlaces": numeric //Number of decimal places
    "isConsistent": boolean,
    "consistencyColumn": "string",
    "encryptionProcessor": "x-on", //To use configured Structural data encryption
    "customValueProcessor": "string"  //If custom value processor applied
  }
}
```

{% endcode %}

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

In this example replacement for the Noise Generator, the additive noise strategy is used.

It scales the noise to 10% of the underlying value. It rounds the noise to 2 decimal places.

The generator is consistent with the `name` column.

```json
{
  "name": "age",
  "schema": "public",
  "table": "users",
  "links": [
    {
      "schema": "public",
      "table": "users",
      "column": "age",
      "metadata": {
        "presetId": "NoiseGenerator",
        "generatorId": "NoiseGenerator",
        "noiseStrategy": "Additive",
        "ratio": 0.1,
        "decimalPlaces": 2,
        "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-noise-generator.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.
