Configure namespaces for Aerospike Connect for Elasticsearch
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:
- set, if configured
- namespace, if configured
- default
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. |
...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...