github.com/Jeffail/benthos/v3@v3.65.0/website/docs/components/processors/metadata.md (about)

     1  ---
     2  title: metadata
     3  type: processor
     4  status: deprecated
     5  ---
     6  
     7  <!--
     8       THIS FILE IS AUTOGENERATED!
     9  
    10       To make changes please edit the contents of:
    11       lib/processor/metadata.go
    12  -->
    13  
    14  import Tabs from '@theme/Tabs';
    15  import TabItem from '@theme/TabItem';
    16  
    17  :::warning DEPRECATED
    18  This component is deprecated and will be removed in the next major version release. Please consider moving onto [alternative components](#alternatives).
    19  :::
    20  
    21  
    22  <Tabs defaultValue="common" values={[
    23    { label: 'Common', value: 'common', },
    24    { label: 'Advanced', value: 'advanced', },
    25  ]}>
    26  
    27  <TabItem value="common">
    28  
    29  ```yaml
    30  # Common config fields, showing default values
    31  label: ""
    32  metadata:
    33    operator: set
    34    key: example
    35    value: ${!hostname()}
    36  ```
    37  
    38  </TabItem>
    39  <TabItem value="advanced">
    40  
    41  ```yaml
    42  # All config fields, showing default values
    43  label: ""
    44  metadata:
    45    operator: set
    46    key: example
    47    value: ${!hostname()}
    48    parts: []
    49  ```
    50  
    51  </TabItem>
    52  </Tabs>
    53  
    54  ## Fields
    55  
    56  ### `operator`
    57  
    58  The operator to apply to messages.
    59  
    60  
    61  Type: `string`  
    62  Default: `"set"`  
    63  Options: `set`, `delete`, `delete_all`, `delete_prefix`.
    64  
    65  ### `key`
    66  
    67  The metadata key to target with the chosen operator.
    68  This field supports [interpolation functions](/docs/configuration/interpolation#bloblang-queries).
    69  
    70  
    71  Type: `string`  
    72  Default: `"example"`  
    73  
    74  ### `value`
    75  
    76  The metadata value to use with the chosen operator.
    77  This field supports [interpolation functions](/docs/configuration/interpolation#bloblang-queries).
    78  
    79  
    80  Type: `string`  
    81  Default: `"${!hostname()}"`  
    82  
    83  ### `parts`
    84  
    85  An optional array of message indexes of a batch that the processor should apply to.
    86  If left empty all messages are processed. This field is only applicable when
    87  batching messages [at the input level](/docs/configuration/batching).
    88  
    89  Indexes can be negative, and if so the part will be selected from the end
    90  counting backwards starting from -1.
    91  
    92  
    93  Type: `array`  
    94  Default: `[]`  
    95  
    96  ## Alternatives
    97  
    98  All functionality of this processor has been superseded by the
    99  [bloblang](/docs/components/processors/bloblang) processor.
   100