How to put conditional if else statements in fluentd record_transformer and add output to column.
eg:
<filter nifi.*>
@type record_transformer
enable_ruby true
auto_typecast true
<record>
NormalizedFileInByte ${a=1024;if record[DataMetricIn]=="GB";record["FilesInByte"].to_f*a.to_f;else;record["FilesInByte"].to_f;end;}
</record>
</filter>
I have put an if else statement and added a new column NormalizedFileInByte to existing log in the above example. But it errors.