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

feat(parsers.value): Add support for automatic fallback for numeric types #13506

Merged
merged 5 commits into from
Jun 29, 2023

Conversation

srebhan
Copy link
Member

@srebhan srebhan commented Jun 27, 2023

This PR adds auto_integer and auto_float options to the value parser. Those two options allow to fallback to string if the parsing into the numeric types fails. This is helpful when the data-source produces multiple streams with mixed numeric and string data such as subscriptions to multiple MQTT topics.

@telegraf-tiger telegraf-tiger bot added feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin plugin/parser 1. Request for new parser plugins 2. Issues/PRs that are related to parser plugins labels Jun 27, 2023
@srebhan srebhan added the ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review. label Jun 27, 2023
@powersj powersj assigned srebhan and unassigned powersj Jun 27, 2023
@telegraf-tiger
Copy link
Contributor

@srebhan srebhan merged commit e2fb181 into influxdata:master Jun 29, 2023
@srebhan srebhan deleted the parsers_value_auto branch June 29, 2023 10:13
powersj pushed a commit to powersj/telegraf that referenced this pull request Jul 5, 2023
@maf-soft
Copy link

maf-soft commented Sep 9, 2023

I'm a first time user of telegraf and influx and tried to get mqtt to work. I spent about 6 hours investigating why telegraf doesn't write any data, activated debug, much later also found the trace option, read all documentation back and forth, asked others, googled, reinstalled influx multiple times, it was really frustrating.
The documentation clearly says auto_float is the way to go. I had no idea that this could be a new feature not yet included in the latest release. Why is there no error message anywhere?
Maybe it's lack of experience on my side, but I would say the documentation should not be updated before the release or clearly mention it.

@srebhan srebhan added this to the v1.28.0 milestone Sep 11, 2023
@srebhan
Copy link
Member Author

srebhan commented Sep 25, 2023

@maf-soft sorry for the bad experience! The unfortunate truth is that the parameter value was not checked previously (also fixed with this commit)... Please apologize for the inconvenience and please also feel free to ask on our Slack channel or forum...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin plugin/parser 1. Request for new parser plugins 2. Issues/PRs that are related to parser plugins ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants