# Text Composition (TextCompositionGenerator)

The [Text Composition](https://docs.tonic.ai/app/generation/generators/generator-reference/text-composition) generator creates a text string that includes values from other columns in the same row.

## Link object structure

The Text Composition generator does not support configuration of linking or consistency. You cannot configure differential privacy.

The metadata object is populated from the `TextCompositionMetadata` object.

The generator-specific configuration is the template to use to populate the value. The template uses the [Liquid template syntax](https://liquidjs.com/filters/overview.html).

{% code overflow="wrap" %}

```json
{
  "presetId": "string",
  "generatorId": "TextCompositionGenerator",
  "schema": "string",
  "table": "string",
  "column": "string",
  "dataType": "string", //MongoDB only
  "metadata": {
​    "template": "string"
​  },
​  "encryptionProcessor": "x-on", //To use configured Structural data encryption
  "customValueProcessor": "string" //If custom value processor applied
}
```

{% endcode %}

## Example replacement

The following example applies the Text Composition generator string to a `nameabbrev` column. The value includes the full value of the `lastname` column, and the first character of the `firstname` column.

{% code overflow="wrap" %}

```json
{
  "name": "nameabbrev",
  "schema": "public",
  "table": "users",
  "links": [
    {
      "presetId": "TextCompositionGenerator",
      "generatorId": "TextCompositionGenerator",
      "schema": "public",
      "table": "users",
      "column": "nameabbrev",
      "metadata": {
        "template": "{{ lastname }}, {{ firstname | slice: 0, 1 }}"
      }
    }
  ]
}
```

{% endcode %}
