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 flatten operation to flatten a set of points into a single point #697

Merged
merged 6 commits into from
Jul 5, 2016

Conversation

nathanielc
Copy link
Contributor

@nathanielc nathanielc commented Jul 5, 2016

Flatten a set of points on specific dimensions.
For example given two points:

m,host=A,port=80 bytes=3512
m,host=A,port=443 bytes=6723

Flattening the points on port would result in a single point:

m,host=A 80.bytes=3512,443.bytes=6723
       |flatten()
           .on('port')

If flattening on multiple dimensions the order is preserved:

m,host=A,port=80 bytes=3512
m,host=A,port=443 bytes=6723
m,host=B,port=443 bytes=7243

Flattening the points on host and port would result in a single point:

m A.80.bytes=3512,A.443.bytes=6723,B.443.bytes=7243
       |flatten()
           .on('host', 'port')

Since flattening points creates dynamically named fields in general it is expected
that the resultant data is passed to a UDF or similar for custom processing.

  • Rebased/mergable
  • Tests pass
  • CHANGELOG.md updated

@nathanielc nathanielc merged commit 9f9b98a into master Jul 5, 2016
@nathanielc nathanielc deleted the nc-flatten branch July 5, 2016 19:56
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.

1 participant