# Constant (ConstantGenerator)

The [Constant](/app/generation/generators/generator-reference/constant.md) generator uses a single value to mask all of the values in the column.

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

The Constant generator does not support linking or consistency. You cannot configure differential privacy.

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

The `constant` field specifies the value to use to populate the column.

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

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

In the following example replacement, the `education-num` column value is replaced by the value `10`.

```json
{
  "name": "education-num",
  "schema": "public",
  "table": "users",
  "links": [
    {
      "schema": "public",
      "table": "users",
      "column": "education-num",
      "metadata": {
        "presetId": "ConstantGenerator",
        "generatorId": "ConstantGenerator",
        "constant": "10"
      }
    }
  ]
}
```


---

# 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-constant.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.
