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

add pivot example for starlark processor #7976

Merged
merged 6 commits into from
Aug 12, 2020
Merged

Conversation

samhld
Copy link
Contributor

@samhld samhld commented Aug 12, 2020

Required for all PRs:

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

to be the key of the value in key `value`

Input: measurement,tag_set sensor=001A0,value=111.48
Output: measurement,tag_set 001A0=111.48
Copy link
Contributor

@ssoroka ssoroka Aug 12, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

love the input output section. We should make this standard for all examples.
I think we should change tag_set to an actual tag though, since this isn't valid line protocol as is.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got rid of the tags altogether as they don't play a role here

Comment on lines 11 to 14
# metric.fields[str(metric.fields['sensor'])] = metric.fields['value']
# metric.fields.pop('value',None)
# metric.fields.pop('sensor',None)
# return metric
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need to have it commented out.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got rid of 'em :)

Copy link
Contributor

@ssoroka ssoroka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One other change I think we should make, as I think this is going to set the standard for how great example docs should look.

Comment on lines 6 to 7
Input: temperature sensor=001A0,value=111.48
Output: temperature 001A0=111.48
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Input: temperature sensor=001A0,value=111.48
Output: temperature 001A0=111.48
Input:
temperature sensor=001A0,value=111.48
Output:
temperature 001A0=111.48

@ssoroka ssoroka merged commit 6c4636b into influxdata:master Aug 12, 2020
idohalevi pushed a commit to idohalevi/telegraf that referenced this pull request Sep 29, 2020
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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants