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

Starlark example dropbytype #8438

Merged
merged 7 commits into from
Nov 27, 2020

Conversation

srebhan
Copy link
Member

@srebhan srebhan commented Nov 19, 2020

Required for all PRs:

  • Signed CLA.
  • Associated README.md updated.
  • Has appropriate unit tests.

Starlark example for dropping fields of metrics by the value type. This is a suitable replacement for PR #3763.

@ssoroka
Copy link
Contributor

ssoroka commented Nov 19, 2020

Left a comment. A further example of a real life use case: sometimes data comes in with dirty types. The field is usually an int, but once in a while some system sticks a string in the type. It would make sense in that case to either drop the field with the unexpected type. You could expand this example to enforcing a schema for a metric.

@srebhan
Copy link
Member Author

srebhan commented Nov 20, 2020

Sure will try to handle your comments during lunch break... ;-)

@srebhan
Copy link
Member Author

srebhan commented Nov 20, 2020

Ok removed the "tag option for removal" to make it more real-life and also added a "drop field by unexpected type example".

@ssoroka
Copy link
Contributor

ssoroka commented Nov 20, 2020

LGTM.

@ssoroka ssoroka merged commit 0ce55bb into influxdata:master Nov 27, 2020
ssoroka pushed a commit that referenced this pull request Dec 1, 2020
(cherry picked from commit 0ce55bb)
@srebhan srebhan deleted the starlark-example-dropbytype branch April 12, 2021 08:30
arstercz pushed a commit to arstercz/telegraf that referenced this pull request Mar 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants