Text Pattern to Field Processor
Extract and transform data by identifying and replacing placeholders within a text pattern. The processor takes an input string or a file containing text with placeholders, matches these placeholders to specific fields in the dataset, and then outputs the transformed text into a designated output column.
This is particularly useful for generating customized text formats, reports, or logs.
Text pattern to field processor Configuration
To add this processor to your pipeline, drag it onto the canvas and right-click to configure.
Input String with Placeholder
Select the source of the text pattern. You can either directly enter the text string or upload a file containing the text.
Options:
Input String: Manually enter the text pattern.
Upload File: Upload a file that contains the text pattern.
Example: “As of {{current_date}}, {{employeeName}} ({{employeeId}}) works as {{designation}} and reports to {{ManagerName}} ({{ManagerEmployeeId}}).”
Pattern
Specify the format of the placeholders in the text pattern. The placeholders will be replaced with the corresponding data fields during processing.
Example:
If the pattern is ($$<FieldName>&&)
, and the dataset field name is source
, then the placeholder $$source&&
in the text will be replaced by the actual data in that field.
Output Column Name
Provide the name of the output column where the processed text will be stored.
Example: If you specify the output column name as EmployeeDetails
, the final transformed text will be stored under this column in the output dataset.
Usage Example
If you have an input string like:
"As of {{current_date}}, {{employeeName}}({{employeeId}}) works as {{designation}} and reports to {{ManagerName}}({{ManagerEmployeeId}})"
And a corresponding pattern:
"$$<FieldName>&&"
The processor will replace each placeholder with the relevant data and output the result in the specified column, such as EmployeeDetails
.
This processor is ideal for scenarios where you need to generate dynamic text outputs based on data fields.
Click the +ADD CONFIGURATION button to add further configurations in key value pair.
If you have any feedback on Gathr documentation, please email us!