This operation allows you to add padding characters to the beginning or end of each line of text. This operation is useful for formatting text, aligning data, or preparing output for specific requirements such as indentation or prefixing/suffixing lines.
These are the input/output expected data types for this operation:
- Input text to be padded. The operation processes multiline text where each line is treated as a separate unit.
- Each line in the input will be padded based on the selected options.
These are the parameters you need to configure to use this operation (mandatory parameters are marked with a *):
Suppose you want to add padding to a series of events:
In your Pipeline, open the required Action configuration and select the input Field.
In the Operation field, choose Pad lines.
Set Pad position to Start
.
Set Pad length to 7
.
Set Characters to >>>
Give your Output field a name and click Save. The strings in your input field will be modified with the specified padding.
For example, the following lines:
will be transformed into:
You can try out operations with specific values using the Input field above the operation. You can enter the value in the example above and check the result in the Output field.