Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
opobla opened this issue Feb 17, 2024 · 2 comments · Fixed by #14870
Closed

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

opobla opened this issue Feb 17, 2024 · 2 comments · Fixed by #14870
Assignees
Labels
feature request Requests for new plugin and for new features to existing plugins

Comments

@opobla
Copy link

opobla commented Feb 17, 2024

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 opobla added the feature request Requests for new plugin and for new features to existing plugins label Feb 17, 2024
@srebhan
Copy link
Member

srebhan commented Feb 21, 2024

@opobla can you please test the binary in PR #14870 and let me know if this fixes the issue for you!?

@srebhan srebhan self-assigned this Feb 21, 2024
@opobla
Copy link
Author

opobla commented Apr 7, 2024

Sorry for the late answer @srebhan . I was away for a time. These days I started implementing this new feature and it works like a charm. Thanks for your work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Requests for new plugin and for new features to existing plugins
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants