github.com/Jeffail/benthos/v3@v3.65.0/website/docs/components/conditions/number.md (about) 1 --- 2 title: number 3 type: condition 4 status: deprecated 5 --- 6 7 <!-- 8 THIS FILE IS AUTOGENERATED! 9 10 To make changes please edit the contents of: 11 lib/condition/number.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 number: 32 operator: equals 33 arg: 0 34 ``` 35 36 </TabItem> 37 <TabItem value="advanced"> 38 39 ```yaml 40 # All config fields, showing default values 41 number: 42 operator: equals 43 arg: 0 44 part: 0 45 ``` 46 47 </TabItem> 48 </Tabs> 49 50 ## Fields 51 52 ### `operator` 53 54 An [operator](#operators) to apply. 55 56 57 Type: `string` 58 Default: `"equals"` 59 60 ### `arg` 61 62 An argument to check against. For some operators this field not be required. 63 64 65 Type: `number` 66 Default: `0` 67 68 ### `part` 69 70 The index of a message within a batch to test the condition against. This 71 field is only applicable when batching messages 72 [at the input level](/docs/configuration/batching). 73 74 Indexes can be negative, and if so the part will be selected from the end 75 counting backwards starting from -1. 76 77 78 Type: `number` 79 Default: `0` 80 81 ## Alternatives 82 83 Consider using the [bloblang](/docs/components/conditions/bloblang) condition 84 instead as it offers a wide range of number processing options. For example, the 85 following condition: 86 87 ``` yaml 88 check_interpolation: 89 value: ${!batch_size()} 90 condition: 91 number: 92 operator: greater_than 93 arg: 1 94 ``` 95 96 Can instead be expressed with: 97 98 ``` yaml 99 bloblang: 'batch_size() > 1' 100 ``` 101