---
title: "Configure namespaces for Aerospike Connect for Elasticsearch"
description: "Configure Aerospike Connect for Elasticsearch namespaces for custom routing, bin transforms, and serialization formats."
---

# Configure namespaces for Aerospike Connect for Elasticsearch

> For the complete documentation index see: [llms.txt](https://aerospike.com/docs/llms.txt)
> 
> All documentation pages available in markdown.

The `namespaces` section of the `aerospike-elasticsearch-outbound.yaml` file overrides settings for bin-name transformations, routing modes, and serialization formats.

| Option | Required | Description |
| --- | --- | --- |
| bin-transforms | no | Bin transforms for the namespace. |
| routing | no | Routing for the namespace. |
| format | no | Format for the namespace. |
| sets | no | Map of set name to bin-transform, routing and format configuration. |

The order of preference for picking the configuration for the bin-transforms, routing and format for a given record are:

1.  set, if configured
2.  namespace, if configured
3.  default

::: caution
-   If the route or format are not specified for a record, the record is skipped.
:::

### Example

This example implements the following rules:

| Namespace | Set | Routing | Format | Bin Transforms | Action |
| --- | --- | --- | --- | --- | --- |
| users |  |  | `custom` |  | Write record in custom format. |
| users | `premium` |  | `custom` (with `flat-json` payload) | `uppercase` | Convert all bin names to upper case and format them in custom format where a custom formatter receives `flat-json` payload. |
| users | `blackList` | `skip` |  |  | Skip sending data of blackList set to Elasticsearch. |
| places |  |  |  |  | Skip record, since routing or format information is missing. |

```yaml
...

format:

  mode: custom

  batch-formatter-class: com.aerospike.connect.outbound.transformer.examples.elasticsearch.ElasticsearchCustomJsonBatchFormatter

namespaces:

  users:

    sets:

      blackList:

        routing:

          mode: skip

      premium:

        format:

          mode: custom

          batch-formatter-class: com.aerospike.connect.outbound.transformer.examples.elasticsearch.ElasticsearchCustomFlatJsonBatchFormatter

          payload-format:

            mode: flat-json

        bin-transforms:

          transforms:

            - uppercase

...
```