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.xpath): Add support for returning underlying data-types #11558

Merged
merged 5 commits into from
Jul 28, 2022

Conversation

srebhan
Copy link
Member

@srebhan srebhan commented Jul 27, 2022

With this PR it is now possible to retrieve the native data-types for fields without explicit conversion for data-formats that inherently know the type. These formats are JSON (xpath_json), MessagePack (xpath_msgpack) and Protocol-buffers (xpath_protobuf). If you enable native types by setting xpath_native_types = true and query a float field (e.g. value = "//myvalue) you will now get a float64 value for that field without explicit conversion required before (value = "number(//myvalue)). This can be helpful when dealing with multiple message types, sharing the same field name, but do have different types...

@telegraf-tiger telegraf-tiger bot added the feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin label Jul 27, 2022
@srebhan srebhan assigned srebhan and unassigned srebhan Jul 27, 2022
@srebhan srebhan added area/xml plugin/parser 1. Request for new parser plugins 2. Issues/PRs that are related to parser plugins labels Jul 27, 2022
@telegraf-tiger
Copy link
Contributor

@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 Jul 28, 2022
@sspaink sspaink merged commit ff17ede into influxdata:master Jul 28, 2022
@srebhan srebhan deleted the xpath_native_types branch November 7, 2022 11:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/xml 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