telegraf icon indicating copy to clipboard operation
telegraf copied to clipboard

CSV serializer should allow to configure the order of the generated columns

Open opobla opened this issue 1 year ago • 0 comments

Use Case

I have one mqtt input and several outputs. Among the outputs there is an [[output.file]] to generate a CSV file that is to be consumed by a third party.

Expected behavior

The generated CSV file must comply with some rules, being the most important one the column order. For example, it is mandatory that column 1 is the timestamp, column 2 is the temperature and column 3 the pressure.

Actual behavior

It is not possible to specify the mapping between fields (or tags) can the column order. I think that the CSV serializer is outputting the columns sorted by the alphabetical name of the corresponding field, and it is not possible to specify other criteria.

Additional info

No response

opobla avatar Feb 17 '24 13:02 opobla